Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to keep program from execution while another running
Message
De
22/04/1998 14:01:40
 
 
À
22/04/1998 13:47:41
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00094065
Message ID:
00094076
Vues:
23
>>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

Thanks, that`s what i need.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform