Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to close webbrowser form with Esc key
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Informix
Divers
Thread ID:
01124304
Message ID:
01124807
Vues:
16
See Q176400, if is OLE control activated :-(

MartinJ
public loform
loform=createobject("form1")
loform.show()

**************************************************
*-- Form:         form1 (l:\test4.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   05/25/06 12:50:05 PM
*
DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT ie AS olecontrol WITH ;
		Top = 28, ;
		Left = 20, ;
		Height = 140, ;
		Width = 142, ;
		Name = "IE"


	ADD OBJECT ie2 AS olecontrol WITH ;
		Top = 26, ;
		Left = 212, ;
		Height = 140, ;
		Width = 142, ;
		Name = "IE2"


	ADD OBJECT text1 AS textbox WITH ;
		Height = 23, ;
		Left = 28, ;
		Top = 203, ;
		Width = 100, ;
		Name = "Text1"


	ADD OBJECT timer1 AS timer WITH ;
		Top = 210, ;
		Left = 280, ;
		Height = 23, ;
		Width = 23, ;
		Interval = 250, ;
		Name = "Timer1"


	PROCEDURE Init
		Declare integer GetFocus in user32.dll

		this.IE.navigate("http://www.google.com")
		this.IE2.navigate("http://www.google.com")
	ENDPROC


	PROCEDURE ie.Refresh
		NODEFAULT
	ENDPROC


	PROCEDURE ie2.Refresh
		NODEFAULT
	ENDPROC


	PROCEDURE timer1.Timer
		thisform.text1.Value=GETFOCUS()
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
>Hi Martin,
>
>>Maybe use API for finding Form's child window that class is "Shell Embedding" and this window must have child window with class "Shell DocObject View".
>
>That's what I first thought, too. But then I have multiple controls on a pageframe. Same position, same size, nothing obvious I could use to distinguish them. It's probably possible if you only have one web control on the form.
>
>Actually, I hoped for something like: "Just set this property prior to accessing hwnd", or "it only happens with a particular build of IE. Download the latest version from ... and the problem disappears". ;-)
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform