網址URL就是"E:\abc.txt"

授人以渔,不授人以鱼。
2013-10-15 19:04
2013-10-15 21:49
程序代码:
CLEAR ALL
SET PATH TO "E:\Projects\mytools"
SET PROCEDURE TO "MyTools"
Main()
CLEAR ALL
RETURN
PROCEDURE Main()
LOCAL loForm
loForm = CREATEOBJECT("_Form")
WITH loForm
.Caption = "WebBrowser測試"
.WindowState = 2
.Show
ENDWITH
READ EVENTS
ENDPROC
DEFINE CLASS _Form AS myForm
ADD OBJECT Web1 AS OleControl WITH OleClass = "Shell.Explorer.2"
PROCEDURE Arrange
WITH ThisForm.Web1
.Top = 0
.Left = 0
.Height = ThisForm.Height
.Width = ThisForm.Width
ENDWITH
ENDPROC
PROCEDURE Activate
DODEFAULT()
WITH ThisForm.Web1
.Navigate("http://)
ENDWITH
ENDPROC
* 如果定位到http://網頁不成功,則轉向本地index.html網頁,前者定位成功時不會激發本事件
PROCEDURE Web1.NavigateError(tpDisp, tcURL, tcFrame, tnStateCode, tlCancel)
This.Navigate("E:\Documents\index.html")
ENDPROC
ENDDEFINE

2013-10-16 00:39
2013-10-16 16:28

2013-10-17 10:47
2013-10-17 17:23
2013-10-18 22:16