Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bind the events of the internet control(web browser cont
Message
From
23/07/2002 10:11:54
 
 
To
23/07/2002 09:33:40
Lu Ping
Zhuhai Tec Co.
Zhuhai, China
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00681598
Message ID:
00681626
Views:
18
If you are using VFP 7.0 and implementing an interface, you want to use the EventHandler() function of 7.0 and not the bind events of vfpcom.dll.

>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
>
>         ....
>         ...
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform