home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
- Begin VB.Form frmOpenPage
- BorderStyle = 3 'Fixed Dialog
- Caption = "Open HTML Document from Disk"
- ClientHeight = 1905
- ClientLeft = 1605
- ClientTop = 2130
- ClientWidth = 5205
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 1905
- ScaleWidth = 5205
- ShowInTaskbar = 0 'False
- Begin VB.CommandButton btnOpenPage
- Caption = "Open Web Page"
- Height = 375
- Left = 1860
- TabIndex = 0
- Top = 1260
- Width = 1515
- End
- Begin MSComDlg.CommonDialog dlgOpen
- Left = 4560
- Top = 1380
- _ExtentX = 847
- _ExtentY = 847
- _Version = 327680
- CancelError = -1 'True
- DefaultExt = ".htm"
- DialogTitle = "Save As..."
- FileName = "download.htm"
- Filter = "*.htm"
- End
- Begin VB.Label Label6
- Alignment = 2 'Center
- Caption = "vtiOpenWebPage"
- Height = 255
- Left = 120
- TabIndex = 2
- Top = 480
- Width = 4935
- WordWrap = -1 'True
- End
- Begin VB.Label Label5
- Caption = "This form uses the following FrontPage Editor methods:"
- Height = 255
- Left = 120
- TabIndex = 1
- Top = 120
- Width = 4935
- End
- Begin VB.Line Line1
- X1 = 120
- X2 = 5040
- Y1 = 960
- Y2 = 960
- End
- Attribute VB_Name = "frmOpenPage"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub btnOpenPage_Click()
- MousePointer = 11
- Dim editor As Object
- Dim page As Object
- Dim canceled As Boolean
- Dim ret As Long
- Dim file As String
- Dim url As String
- canceled = False
- Set editor = CreateObject("FrontPage.Editor")
- On Error GoTo FileCancel
- dlgOpen.Filter = "HTML Files (*.htm)|*.htm"
- dlgOpen.DialogTitle = "Open HTML Document"
- dlgOpen.filename = ""
- dlgOpen.ShowOpen
- If Not canceled And Len(dlgOpen.filename) > 0 Then
- MousePointer = 11
- file = dlgOpen.filename
- url = dlgOpen.FileTitle
- Set page = editor.vtiOpenWebPage(file, url, "", "")
- Set page = Nothing
- End If
- MousePointer = 0
- Set editor = Nothing
- Exit Sub
- FileCancel:
- canceled = True
- Resume Next
- End Sub
-