Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bind the events of the internet control(web browser cont
Message
De
23/07/2002 10:11:54
 
 
À
23/07/2002 09:33:40
Lu Ping
Zhuhai Tec Co.
Zhuhai, Chine
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00681598
Message ID:
00681626
Vues:
17
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
>
>         ....
>         ...
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform