Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to keep program from execution while another running
Message
From
22/04/1998 13:47:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
22/04/1998 13:36:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00094065
Message ID:
00094071
Views:
24
>Hi All,
>
>My executable runs another .exe and i need to keep my program from execution, while this another running.
>I haven`t been here long time. It seems to me, that there was a sample code in FAQ before, but now i can`t find it.
>All suggestions are wery appreciated.
>
>TIA,
>Vidmantas
You mean hang your code for a while (other app is running). Then in files section there is a is_run api and findwindow. And in addition I use something like :
tcWaitWindowClass = findwindowclass("Microsoft Word - Document1")
*do something
do while findwindowhandle(tcWaitWindowClass)<>0
enddo

function findwindowclass
lparameters tcWintitle
DECLARE integer FindWindow in WIN32API string cNull, string cWinName
declare integer GetClassName in WIN32API integer hWnd, string @cClass, integer nMaxBuffer
hWnd = FindWindow(0,tcWintitle)
lpClassName = space(200)
nBufLen = GetClassName(hWnd,@lpClassName,200)
clear dlls
return substr(lpClassName,1,nBufLen)

function findwindow
lparameter tcWinClass
DECLARE integer FindWindow in WIN32API string cNull, string cWinName
nHWND = FindWindow(tcWinClass,0)
clear dlls
return nHWND
I prefer getting class first because many applications have different title at exit.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform