Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Translate VB Command to Visual Fox Command.
Message
From
12/11/2004 06:24:27
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00960723
Message ID:
00960735
Views:
7
Hi Bernhart,

I'm not sure how to emulate the Shell function exactly within Visual FoxPro but have you tried Visual FoxPro's RUN command?
RUN /N "C:\BOB\BOBLINK /CIE=01 /USR=AFM /MOD=CUSTOMER /MNF=COMPAN.DB /AUTOCLOSE"
or
! /N "C:\BOB\BOBLINK /CIE=01 /USR=AFM /MOD=CUSTOMER /MNF=COMPAN.DB /AUTOCLOSE"
It is pretty limited in comparison to VB's Shell function, there is no return value (Resultat in your example) for instance. I think you can emulate the WindowStyle of vbNormalFocus by adding the number 1 after /N

e.g.
RUN /N1 "C:\BOB\BOBLINK /CIE=01 /USR=AFM /MOD=CUSTOMER /MNF=COMPAN.DB /AUTOCLOSE"
I've not tested this however, nor have I used RUN in VFP 8 (I use VFP 6); there may well be improvements to how VFP 8 handles this kind of scenario.

Hope this helps,

Ben
Ben Sugden

"Remember to enjoy hunting - and that means relishing the search for the product that has never been advertised or placed handily at the front of the shop; Life begins on the uppermost shelf, avoid guide books and top 10's like the plague." - Ramsey Dukes
Previous
Reply
Map
View

Click here to load this message in the networking platform