Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to get HWND of ShellExecute launched app
Message
 
 
To
07/01/2003 12:40:56
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00738764
Message ID:
00738987
Views:
24
Cetin,

I get an error on the second instance of Word (problems reading normal.dot) if I just highlight and execute this code:
ShellExecute( hDCScreen, "open", "winword.exe", "", "c:\", 1 )
ShellExecute( hDCScreen, "open", "winword.exe", "", "c:\", 1 )
This seems to work ok though:
ShellExecute( hDCScreen, "open", "winword.exe", "", "c:\", 1 )
inkey( 2 )
ShellExecute( hDCScreen, "open", "winword.exe", "", "c:\", 1 )
The 2 seconds is enough for the first instance of Word to get up and running before starting the second. Can you not just use a simple delay to generally solve your problem?


>Unfortunately same side effect. Say user wanted to launch winword 2 times (main.app dispatches requests to another exe). Second call to word doesn't wait.
>PS: Shell* call CreateProcess and they use WaitForSingleObject which is defeated by apps. making DDE brodcast.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform