home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 January / dppcpro0199a.iso / January / Fp98 / SDK / Utility / Apitests / Querypg.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-09-18  |  2.8 KB  |  92 lines

  1. VERSION 5.00
  2. Begin VB.Form frmQueryPage 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Query Web Page"
  5.    ClientHeight    =   2385
  6.    ClientLeft      =   1500
  7.    ClientTop       =   2265
  8.    ClientWidth     =   5190
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   2385
  14.    ScaleWidth      =   5190
  15.    ShowInTaskbar   =   0   'False
  16.    Begin VB.CommandButton btnQuery 
  17.       Caption         =   "Query Web Page"
  18.       Height          =   375
  19.       Left            =   1860
  20.       TabIndex        =   2
  21.       Top             =   1200
  22.       Width           =   1515
  23.    End
  24.    Begin VB.Label Label1 
  25.       Caption         =   $"querypg.frx":0000
  26.       Height          =   615
  27.       Left            =   120
  28.       TabIndex        =   3
  29.       Top             =   1620
  30.       Width           =   4935
  31.    End
  32.    Begin VB.Line Line1 
  33.       X1              =   120
  34.       X2              =   5040
  35.       Y1              =   960
  36.       Y2              =   960
  37.    End
  38.    Begin VB.Label Label5 
  39.       Caption         =   "This form uses the following FrontPage Editor methods:"
  40.       Height          =   255
  41.       Left            =   120
  42.       TabIndex        =   1
  43.       Top             =   120
  44.       Width           =   4935
  45.    End
  46.    Begin VB.Label Label6 
  47.       Alignment       =   2  'Center
  48.       Caption         =   "vtiQueryWebPage"
  49.       Height          =   255
  50.       Left            =   120
  51.       TabIndex        =   0
  52.       Top             =   480
  53.       Width           =   4935
  54.       WordWrap        =   -1  'True
  55.    End
  56. Attribute VB_Name = "frmQueryPage"
  57. Attribute VB_GlobalNameSpace = False
  58. Attribute VB_Creatable = False
  59. Attribute VB_PredeclaredId = True
  60. Attribute VB_Exposed = False
  61. Option Explicit
  62. Private Sub btnQuery_Click()
  63.     Dim editor As Object
  64.     Dim webber As Object
  65.     Dim webURL As String
  66.     Dim ret As Long
  67.     Dim url As String
  68.     Set webber = CreateObject("FrontPage.Explorer")
  69.     webURL = webber.vtiGetWebURL
  70.     Set webber = Nothing
  71.     If Len(webURL) = 0 Then
  72.         MsgBox "No web is currently open in the Explorer."
  73.         Exit Sub
  74.     End If
  75.     MousePointer = 11
  76.     frmGetURL.Tag = ""
  77.     frmGetURL.Show 1
  78.     If frmGetURL.Tag <> "" Then
  79.         url = frmGetURL.Tag
  80.         Set editor = CreateObject("FrontPage.Editor")
  81.         ret = editor.vtiQueryWebPage(url, webURL)
  82.         If ret = 1 Then
  83.             MsgBox "Document is being edited by the FrontPage Editor."
  84.         Else
  85.             MsgBox "Document is not loaded in the FrontPage Editor."
  86.         End If
  87.         Set editor = Nothing
  88.     End If
  89.     frmGetURL.Tag = ""
  90.     MousePointer = 0
  91. End Sub
  92.