Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check to see if a program is running.
Message
From
07/05/1997 21:23:04
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00031210
Message ID:
00031247
Views:
42
>>>Great, Found the FindWindow API, which dll is it in?
>
>Sorry I don't understand RegFn and CallFn
>
>kim
>
>>
>>Check this one:
>>
>>FUNCTION CheckWin
>>* Routine which sees if an application is active by looking for its
>>* Window title
>>* expC1 Window title
>>PARAMETER tcTitle
>>returnv=.F.
>>mGetWinTxt=RegFn("GetWindowText","I@CI","I")
>>mGetWindow=RegFn("GetWindow","II","I")
>>mIsWinVis=RegFn("IsWindowVisible","I","I")
>>foxhwnd=MAINHWND()
>>hwndNext=CallFn(mGetWindow,foxhwnd,0)
>>DO WHILE hwndNext0
>> Stuffer=SPACE(64)
>> x=CallFn(mGetWinTxt,hwndnext,@Stuffer,64)
>> IF UPPER(tcTitle)$UPPER(stuffer)
>> returnv=.T.
>> ENDIF
>> hwndNext=CallFn(mGetWindow,hwndnext,2)
>>ENDDO
>>RETURN returnv

RegFn and CallFn are defined in FoxTools.fll/dll. But FoxTools is not very recommended.

Use instead, Arnon's aproach with DECLARE.

Vlad
Previous
Reply
Map
View

Click here to load this message in the networking platform