Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bind the events of the internet control(web browser control)
Message
De
23/07/2002 09:33:40
Lu Ping
Zhuhai Tec Co.
Zhuhai, Chine
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Bind the events of the internet control(web browser control)
Divers
Thread ID:
00681598
Message ID:
00681598
Vues:
50
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

         ....
         ...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform