Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Launching Metro Apps from Foxpro

Status
Not open for further replies.

timdobie

Programmer
Nov 6, 2013
5
AU

Hi

I'm wondering if anyone knows a way of launching a "Metro"/Windows 8 UI style app from foxpro.
I have had some success using the Shellexecute() from the Win32API.
By calling for a specific file I can launch a "Metro"/Windows 8 UI style app as long as it is the 'default' program for that file type.
example:

cFileName = "c:\my_picture.jpg"
cAction = "open"
ShellExecute(0,cAction,cFileName,"","",1)



But if I need to launch a specific app (one that can't be chosen as the 'default' for a particular file type) like the Camera app.
Shellexecute() wont work.
example:

cFileName = "c:\Windows\Camera\Camera.exe"
cAction = "open"
ShellExecute(0,cAction,cFileName,"","",1)




I'm almost ready to resort to writing an executable in .NET that will launch the Metro and then launching that from foxpro.

Any Suggestions?

Thanks
Tim
 
Sorry I don't know the answer. But, rather than writing a .NET program to launch the Metro app, wouldn't it be easier to create a batch file or a desktop shortcut to do the job? I don't know for sure if that would work, but it might be worth thinking about.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top