Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I run Windows Explorer in a VFP Form?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
01117471
Message ID:
01117596
Vues:
18
I think it was Calvin Hsia that came up with this one
Public ox
ox=Newobject("myformx")
Bindevent(_Screen,"resize",ox,"resize")
ox.Show
Define Class myformx As Form
	Add Object txtURL As TextBox With Width=400,Value="c:\",Autocomplete=3
	Add Object cmdRefresh As CommandButton With Caption="\<Rafraichir",Left=400,Height=20
	Add Object cmdBack As CommandButton With Caption="\<Reculer",Left=500,Height=20
	Add Object cmdForward As CommandButton With Caption="\<Avancer",Left=600,Height=20
	Add Object oweb As cweb With Top=30
	Width=800
	Height=800
	AlwaysOnBottom=.T.
	AllowOutput=.F.
	TitleBar=0
	Procedure Init
	This.oweb.Width=Thisform.Width
	Thisform.Resize
	This.oweb.Height=Thisform.Height-Thisform.txtURL.Height-2
	Thisform.txtURL.Valid
	Endproc
	Procedure Resize
	Thisform.Width=_Screen.Width
	Thisform.Height=_Screen.Height
	This.oweb.Top=30
	This.oweb.Height=Thisform.Height-100
	This.oweb.Width=Thisform.Width-Thisform.Left
	Endproc
	Procedure txtURL.Valid
	Thisform.oweb.Navigate(This.Value)
	Endproc
	Procedure cmdRefresh.Click
	Thisform.oweb.Refresh
	Endproc
	Procedure cmdBack.Click
	Try
		Thisform.oweb.GoBack()
	Catch
	Endtry
	Endproc
	Procedure cmdForward.Click
	Try
		Thisform.oweb.GoForward()
	Catch
	Endtry
	Endproc
Enddefine

Define Class cweb As OleControl
	OleClass="shell.explorer.2"
	Procedure Refresh
	Nodefault
Enddefine
>Ideally I would like the full functionality of Windows explorer in the VFP form and the ability to display the properties of the file that is selected, somewhere on the Right side of the form.
>ie I also need to trap the click event and thereby display this information.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform