VBGood网站全文搜索 Google

搜索VBGood全站网页(全文搜索)
首页 - 经验之谈 - 建立你自己的浏览器-发送到FontPage
发表评论(0)作者:Soma Sundaram, 平台:VB6.0+Win98, 阅读:8100, 日期:2001-04-28
Edit With FrontPage

Insert Inet Control (Name - Inet1)
Insert This line into your Module Declaration Section

Public Declare Function ShellExecute Lib “shell32.dll” Alias “ShellExecuteA” (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Public Const SW_SHOW = 5

Type SHELLEXECUTEINFO
  cbSize As Long
  fMask As Long
  hWnd As Long
  lpVerb As String
  lpFile As String
  lpParameters As String
  lpDirectory As String
  nShow As Long
  hInstApp As Long
  lpIDList As Long
  lpClass As String
  hkeyClass As Long
  dwHotKey As Long
  hIcon As Long
  hProcess As Long
End Type

Insert these coding into your click Event:

Dim rpo As String
On Error Resume Next
Dim lrs As String
Dim b() As Byte
lrs = “C:\windows\temp.htm”
Inet1.Cancel
Inet1.Protocol = icHTTP
Inet1.URL = cboaddress.Text
rpo = Dir$(“C:\Program Files\Microsoft FrontPage\bin\fpeditor.exe”)
If rpo <> “” Then
If Inet1.URL <> “” Then
b() = Inet1.OpenURL(, icByteArray)
Open lrs For Binary Access Write As #1
Put #1, , b()
Close #1
Dim retval As Long
retval = ShellExecute(Me.hWnd, “open”, “C:\Program Files\Microsoft FrontPage\bin\fpeditor.exe”, lrs, “C:\MyProg\”, SW_MAXIMIZE)
Else
MsgBox “There is no source code for this. It may be a System File.”
End If
Else
MsgBox “Microsoft Front Page Software Not Found.”
End If