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!

hide DOS command box using ShellExecute 2

Status
Not open for further replies.

Jerryyang

Programmer
Feb 15, 2011
8
CA
I want to hide the DOS command box, for the command:

RUN mysqldump -umyid -pmypass admdata > c:\backup1.txt

I was suggested to use ShellExecute.

How can I do that?

I'm using VFP 9.

Thanks for the help
 
Jerryyang

Unfortunately Mike's otherwise excellent article only details some of the nShowWindow parameters.
MSDN said:
Value Meaning
---------------------------------------------------------------------

0 Hides the window and passes activation to another
window.

1 Activates and displays a window. If the window is
minimized or maximized, Windows restores it to its
original size and position (same as 9).

2 Activates a window and displays it as an icon.

3 Activates a window and displays it as a maximized
window.

4 Displays a window in its most recent size and
position. The window that is currently active remains
active.

5 Activates a window and displays it in its current
size and position.

6 Minimizes the specified window and activates the
top-level window in the system's list.

7 Displays a window as an icon. The window that is
currently active remains active.

8 Displays a window in its current state. The window
that is currently active remains active.

9 Activates and displays a window. If the window is
minimized or maximized, Windows restores it to its
original size and position (same as 1).
You need 0 to run it hidden


FAQ184-2483​
Chris [pc2]
PDFcommander.com
motrac.co.uk
 
Hi Jerry,

in Mike Lewis nomenclature
cAction is "open" for the mysqldump.exe
cFileName is of course "mysqldump.exe"
cParams is "-umyid -pmypass admdata > c:\backup1.txt"

You could also stay with RUN and use a foxrun.pif configured to run cmd.exe minimized. That would still show the dos task in the taskbar, though.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top