Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running an MSDOS command
Message
De
28/02/2002 09:42:53
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
28/02/2002 08:32:14
Ashish Patel
Hindustan Petroleum
Mumbai, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00626279
Message ID:
00626398
Vues:
14
>Hi Cetin
>
>Can you pl. explain on what the command
>ShellExecute(0,'','c:\fpd26\foxprox.exe','myDOS.prg','c:\fpd26',SW_HIDE)
>will do ?
>Where can I get what I have to passed for each parameter.
>
>Why I am asking this is because if I want to use
>pkzip or some other command on a button click what all parameters I have to pass
>and weather I can make out that job was over or error was returned.
>
>Thanks in Advance
>
>Ashish Patel

Ashish,
Below unofficial simple explanation:

ShellExecute(0,'','c:\fpd26\foxprox.exe','myDOS.prg','c:\fpd26',SW_HIDE)

1st is Hwnd of owning parent window. Might be NULL as is here.
2nd is Operation (verbs) :
-edit: Launches an editor and opens the document for editing. If lpFile is not a document file, the function will fail.
-explore: Explores the folder specified by lpFile.
-find: Initiates a search starting from the specified directory.
-open: Opens the file specified by the lpFile parameter. The file can be an executable file, a document file, or a folder.
-print: Prints the document file specified by lpFile. If lpFile is not a document file, the function will fail.

ie: (for 2nd parameter)
ShellExecute(0,'Open','c:\SomePath\mymusic.mp3','','',SW_HIDE)
or
ShellExecute(0,'Open','c:\SomePath\mymusic.mp3',0,0,SW_HIDE)

Effect is DblClicking an .mp3 file in explorer (except SW_HIDE).
This one somewhat play in background.

3rd is a file : If executable than 2nd is none. If not an executable (like above) than it's the file that would be called with Operation (2nd).

4th : Parameters sent. (with nonExecutables NULL)
5th : Working dir.
6th : App window state
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform