home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch17 / iexlpore / iexplore.frm (.txt) next >
Encoding:
Visual Basic Form  |  1997-02-20  |  3.8 KB  |  131 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "InternetExplorer Automation"
  4.    ClientHeight    =   3075
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   4650
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3075
  10.    ScaleWidth      =   4650
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton QuiteBttn 
  13.       Caption         =   "Quit"
  14.       BeginProperty Font 
  15.          Name            =   "MS Sans Serif"
  16.          Size            =   9.75
  17.          Charset         =   0
  18.          Weight          =   400
  19.          Underline       =   0   'False
  20.          Italic          =   0   'False
  21.          Strikethrough   =   0   'False
  22.       EndProperty
  23.       Height          =   405
  24.       Left            =   2985
  25.       TabIndex        =   4
  26.       Top             =   2520
  27.       Width           =   1260
  28.    End
  29.    Begin VB.CommandButton ForwardBttn 
  30.       Caption         =   "Go Forward"
  31.       BeginProperty Font 
  32.          Name            =   "MS Sans Serif"
  33.          Size            =   9.75
  34.          Charset         =   0
  35.          Weight          =   400
  36.          Underline       =   0   'False
  37.          Italic          =   0   'False
  38.          Strikethrough   =   0   'False
  39.       EndProperty
  40.       Height          =   405
  41.       Left            =   1680
  42.       TabIndex        =   3
  43.       Top             =   2520
  44.       Width           =   1260
  45.    End
  46.    Begin VB.CommandButton BackBttn 
  47.       Caption         =   "Go Back"
  48.       BeginProperty Font 
  49.          Name            =   "MS Sans Serif"
  50.          Size            =   9.75
  51.          Charset         =   0
  52.          Weight          =   400
  53.          Underline       =   0   'False
  54.          Italic          =   0   'False
  55.          Strikethrough   =   0   'False
  56.       EndProperty
  57.       Height          =   405
  58.       Left            =   360
  59.       TabIndex        =   2
  60.       Top             =   2520
  61.       Width           =   1260
  62.    End
  63.    Begin VB.ListBox List1 
  64.       BeginProperty Font 
  65.          Name            =   "MS Sans Serif"
  66.          Size            =   9.75
  67.          Charset         =   0
  68.          Weight          =   400
  69.          Underline       =   0   'False
  70.          Italic          =   0   'False
  71.          Strikethrough   =   0   'False
  72.       EndProperty
  73.       Height          =   2010
  74.       Left            =   1815
  75.       TabIndex        =   1
  76.       Top             =   270
  77.       Width           =   2475
  78.    End
  79.    Begin VB.CommandButton Command1 
  80.       Caption         =   "Show URL"
  81.       BeginProperty Font 
  82.          Name            =   "MS Sans Serif"
  83.          Size            =   9.75
  84.          Charset         =   0
  85.          Weight          =   400
  86.          Underline       =   0   'False
  87.          Italic          =   0   'False
  88.          Strikethrough   =   0   'False
  89.       EndProperty
  90.       Height          =   450
  91.       Left            =   360
  92.       TabIndex        =   0
  93.       Top             =   315
  94.       Width           =   1260
  95.    End
  96. Attribute VB_Name = "Form1"
  97. Attribute VB_GlobalNameSpace = False
  98. Attribute VB_Creatable = False
  99. Attribute VB_PredeclaredId = True
  100. Attribute VB_Exposed = False
  101. Option Explicit
  102. Dim IE As New InternetExplorer
  103. Private Sub BackBttn_Click()
  104. On Error GoTo NoBack
  105. IE.GoBack
  106. Exit Sub
  107. NoBack:
  108. MsgBox "There are no URL in the History List"
  109. End Sub
  110. Private Sub Command1_Click()
  111. IE.ToolBar = False
  112. IE.MenuBar = False
  113. IE.Visible = True
  114. IE.navigate "http://www." & List1.Text & ".com"
  115. End Sub
  116. Private Sub Form_Load()
  117. List1.AddItem "microsoft"
  118. List1.AddItem "sybex"
  119. List1.AddItem "alta-vista"
  120. End Sub
  121. Private Sub ForwardBttn_Click()
  122. On Error GoTo NoForward
  123. IE.GoForward
  124. Exit Sub
  125. NoForward:
  126. MsgBox "There are no URLs in the History List"
  127. End Sub
  128. Private Sub QuiteBttn_Click()
  129. IE.Quit
  130. End Sub
  131.