Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bind the events of the internet control(web browser control)
Message
From
23/07/2002 09:33:40
Lu Ping
Zhuhai Tec Co.
Zhuhai, China
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Bind the events of the internet control(web browser control)
Miscellaneous
Thread ID:
00681598
Message ID:
00681598
Views:
51
First I use the code below:
 loBinder = CreateObject("VFPCOM.COMUtil")
 lofrmWebBrowser = CreateObject('myweber')
 loEventHandler = CreateObject('WebHandler')
 loBiner.BindEvents(lofrmWebBrowser.oleWeb ,loEventHandler)
myweber is form that it contian a internet control inside
WebHandler is a session ,that use implement clause to decribe the interface

but the code upside do not work,the code result I design is when a user click a hyperlinker that
shall new a window ,I want the window is my defined one ,not the internet explorer,another result
is control user action when they browser the my designed website.

below is some snappet of the event handler :
 DEFINE CLASS WebHandler AS session OLEPUBLIC

	IMPLEMENTS IWebBrowserApp IN "c:\winnt\system32\shdocvw.dll"
  	PROCEDURE IWebBrowserApp_Navigate(URL AS STRING, Flags AS VARIANT, TargetFrameName AS VARIANT, PostData AS VARIANT, Headers AS VARIANT) AS VOID;
 				HELPSTRING "Navigates to a URL or file."
	* add user code here
	  gnWeberCount = gnWeberCount + 1
	  DIMENSION gaoWeber[gnWeberCount]
	  gaoWeber[gnWeberCount] = CREATEOBJECT('myweber')
	  gaoWeber[gnWeberCount].GoWeb(URL)
	  gaoWeber[gnWeberCount].Show()
	  
	ENDPROC

         ....
         ...
Next
Reply
Map
View

Click here to load this message in the networking platform