Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shellexecute and dos (CMD) window
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Shellexecute and dos (CMD) window
Miscellaneous
Thread ID:
00140918
Message ID:
00140918
Views:
46
The following code (borrowed from David Frankenbach and modified) will map a drive, but it pulls up a dos window momentarily. Is there anyway to stop this or minimize the window while it is executing?


declare long ShellExecute in "shell32.dll" long hwnd, string lpszOp, ;
string lpszFile, string lpszParams, ;
string lpszDir, long nShowCmd
declare long GetDesktopWindow in "win32api"
local hDCScreen
hDCScreen = GetDesktopWindow()
mcommand=" use * \\myserver\c$"
ShellExecute(hDCScreen, "open", "c:\winnt\system32\net.exe", mcommand, "c:\", 1 )
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Next
Reply
Map
View

Click here to load this message in the networking platform