home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.0#0"; "SHDOCVW.DLL"
- Begin VB.Form Form1
- Caption = "Simple Web Browser"
- ClientHeight = 3030
- ClientLeft = 1530
- ClientTop = 1530
- ClientWidth = 6690
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 3030
- ScaleWidth = 6690
- WindowState = 2 'Maximized
- Begin SHDocVwCtl.WebBrowser WebBrowser1
- Height = 1215
- Left = 120
- TabIndex = 4
- Top = 1200
- Width = 1815
- Object.Height = 81
- Object.Width = 121
- AutoSize = 0
- ViewMode = 1
- AutoSizePercentage= 0
- AutoArrange = -1 'True
- NoClientEdge = -1 'True
- AlignLeft = 0 'False
- End
- Begin VB.CommandButton cmdQuit
- Caption = "&Quit"
- Height = 495
- Left = 1560
- TabIndex = 3
- Top = 480
- Width = 1215
- End
- Begin VB.TextBox txtURL
- Height = 375
- Left = 960
- TabIndex = 1
- Top = 0
- Width = 3135
- End
- Begin VB.CommandButton cmdRetrieve
- Caption = "&Retrieve Document"
- Height = 495
- Left = 120
- TabIndex = 0
- Top = 480
- Width = 1215
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "URL:"
- Height = 255
- Left = 240
- TabIndex = 2
- Top = 120
- Width = 615
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdQuit_Click()
- End
- End Sub
- Private Sub cmdRetrieve_Click()
- 'Calls up the URL typed in the Text Box
- WebBrowser1.Navigate (txtURL.Text)
- End Sub
- Private Sub Form_Load()
- WebBrowser1.GoHome 'Calls up Internet Explorer's home page
- End Sub
- Private Sub Form_Resize()
- 'Resizes the Web Browser control with the Form, as long
- 'as the form is not minimized.
- 'Occurs when an object is first displayed
- If Form1.WindowState <> 1 Then
- WebBrowser1.Width = Form1.ScaleWidth
- WebBrowser1.Height = Form1.ScaleHeight - 740 'Subtract Toolbar height
- End If
- End Sub
- Private Sub WebBrowser1_NavigateComplete(ByVal URL As String)
- 'Is activated when the HTML control finishes
- 'retrieving the requested Web page.
- 'Updates Text Box
- s URL Display to show current URL
- On Error Resume Next 'Eliminates error messages
- txtURL.Text = WebBrowser1.LocationURL
- End Sub
-