Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DestroyWindow
Message
 
To
26/09/2000 09:03:28
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00420813
Message ID:
00420852
Views:
20
>Hi George,
>
>This is what I'm doing:
>
>* Pararameters passed to the program
>cpram_string = " " + ALLTRIM(STR(nno_employe, 11)) + ' ' + ALLTRIM(STR(nuser_lingo)) + ' ' + ALLTRIM(STR(node_cursor.security, 12))
>* Path of the program
>cpath_name = SYS(5) + SYS(2003) + "\" + ALLTRIM(node_cursor.exe_name)
>* Run command with the path & parameters
>cexe_macro = "!/N " + cpath_name + cpram_string
>* Execute the run command
>&cexe_macro
>
Mike,

You'll have to get the window handle immediately after executing the macro, then use that to shut down the other applications. What I'd suggest here is using a loop to make the calling program wait until the program being executed initialized and its window appeared. I'd store the window handle for shutting down later. In order to determine if the other program was still executing, I'd use the IsWindow() API function (sample below). If the window doesn't exist, shut down the other application.
DECLARE INTEGER IsWindow IN Win32API;
  INTEGER hWnd
* lnhwnd is the window handle of interest
llresult = (IsWindow(lnhwnd) # 0)
llresult will be .T. or .F. depending on whether or not the window exists.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform