Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to drive the MS explorer windows from fox
Message
From
01/02/2000 08:38:46
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00325488
Message ID:
00325509
Views:
20
>I mean, not inside a Fox Windows; I just want to open MS Explorer from Fox and tell where to go. If a user press a button in fox, I want to change the address of the current MS Explorer.
>Something with OLE maybe ?
>
>Thanks
>eric

You can use the Shell.Application object to get a handle on a running instance of Explorer:
oShell = CREATEOBJECT("Shell.Application")
FOR EACH oWindow IN oShell.Windows
	?oWindow.LocationURL
	IF oWindow.LocationURL = "file"
		oWindow.Navigate("file:///C:/Data")
		EXIT
	ENDIF
ENDFOR
The Windows collection contains both IE and Windows Explorer instances, but you can tell which are which by looking at the LocationURL property

Once you decide which instance you want to use, just use the navigate method to change its current directory. If there are no open instances, you can use the Shell.Explore() method to open one:

oShell.Explore("c:\data\")
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform