vbAccelerator - Contents of code file: frmBrowser.frm

VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "shdocvw.dll"
Begin VB.Form frmBrowser 
   Caption         =   "Start Page"
   ClientHeight    =   5520
   ClientLeft      =   3060
   ClientTop       =   3345
   ClientWidth     =   7815
   ControlBox      =   0   'False
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   5520
   ScaleWidth      =   7815
   ShowInTaskbar   =   0   'False
   Begin SHDocVwCtl.WebBrowser brwWebBrowser 
      Height          =   3735
      Left            =   180
      TabIndex        =   0
      Top             =   60
      Width           =   5400
      ExtentX         =   9525
      ExtentY         =   6588
      ViewMode        =   1
      Offline         =   0
      Silent          =   0
      RegisterAsBrowser=   0
      RegisterAsDropTarget=   0
      AutoArrange     =   -1  'True
      NoClientEdge    =   -1  'True
      AlignLeft       =   0   'False
      NoWebView       =   0   'False
      HideFileNames   =   0   'False
      SingleClick     =   0   'False
      SingleSelection =   0   'False
      NoFolders       =   0   'False
      Transparent     =   0   'False
      ViewID          =   "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
      Location        =   ""
   End
   Begin VB.Timer timTimer 
      Enabled         =   0   'False
      Interval        =   5
      Left            =   6180
      Top             =   1500
   End
End
Attribute VB_Name = "frmBrowser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private m_sUrl As String
Private m_sLastUrl As String
Private mbDontNavigateNow As Boolean

Public Property Get Url() As String
   Url = m_sUrl
End Property
Public Property Let Url(ByVal sUrl As String)
   m_sUrl = sUrl
   Navigate
End Property

Private Sub Navigate()
   If Len(m_sUrl) > 0 Then
      If (m_sUrl <> m_sLastUrl) Then
         'try to navigate to the starting address
         timTimer.Enabled = True
         brwWebBrowser.Navigate m_sUrl
      End If
   End If
End Sub

Private Sub Form_Initialize()
   brwWebBrowser.Silent = True
End Sub

Private Sub Form_Load()
   Navigate
End Sub

Private Sub brwWebBrowser_DownloadComplete()
    On Error Resume Next
    'Me.Caption = brwWebBrowser.LocationName
End Sub

Private Sub brwWebBrowser_NavigateComplete(ByVal Url As String)
    Dim i As Integer
    Dim bFound As Boolean
    m_sLastUrl = brwWebBrowser.LocationURL
    'Me.Caption = brwWebBrowser.LocationName
    'For i = 0 To cboAddress.ListCount - 1
    '    If cboAddress.List(i) = brwWebBrowser.LocationURL Then
    '        bFound = True
    '        Exit For
    '    End If
    'Next i
    mbDontNavigateNow = True
    'If bFound Then
    '    cboAddress.RemoveItem i
    'End If
    'cboAddress.AddItem brwWebBrowser.LocationURL, 0
    'cboAddress.ListIndex = 0
    mbDontNavigateNow = False
End Sub

Private Sub Form_Resize()
   On Error Resume Next
   brwWebBrowser.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
    'cboAddress.Width = Me.ScaleWidth - 100
    'brwWebBrowser.Width = Me.ScaleWidth - 100
    'brwWebBrowser.Height = Me.ScaleHeight - (picAddress.Top +
     picAddress.Height) - 100
End Sub

Private Sub timTimer_Timer()
    If brwWebBrowser.Busy = False Then
        timTimer.Enabled = False
        Me.Caption = brwWebBrowser.LocationName
    Else
        Me.Caption = "Working..."
    End If
End Sub

'Private Sub tbToolBar_ButtonClick(ByVal Button As Button)
'    On Error Resume Next
'
'    timTimer.Enabled = True
'
'    Select Case Button.Key
'        Case "Back"
'            brwWebBrowser.GoBack
'        Case "Forward"
'            brwWebBrowser.GoForward
'        Case "Refresh"
'            brwWebBrowser.Refresh
'        Case "Home"
'            brwWebBrowser.GoHome
'        Case "Search"
'            brwWebBrowser.GoSearch
'        Case "Stop"
'            timTimer.Enabled = False
'            brwWebBrowser.Stop
'            Me.Caption = brwWebBrowser.LocationName
'    End Select
'
'End Sub