Dear Roger,
is it possible to correct the function DC_IsAppRunning("XbpPmtClass","",appname(),.T.)
which will work correctly with Xbase++ CRT APP Window - SetAppWindow() when the
application does not use APPSYS.PRG. If possible, I would like to ask for it.
In my example, which I am attaching, the function DC_IsAppRunning does not work correctly,
while the function IntCnt(.T.) written in 2008 by Michael McVicker works correctly.
Also, the function IntCnt(.T.) works in the control: MsgBox(), ConfirmBox(), AlertBox()...
I am attaching the source code of the test program for both functions and the code
for the function IntCnt() in the RUNAPP.ZIP.
Note:
Until recently I thought that this with CRT windows was no longer needed by anyone.
But the need for this technique arose when training new users of
Alaska Xbase++ and eXpress++ who finally want to transfer their existing Clipper
applications to Xbase++ and eXpress++, because 64-bit Windows 11
no longer allows further play with Clipper.
DC_IsAppRunning() and CRT window
- slobodan1949
- Posts: 97
- Joined: Mon Apr 25, 2011 8:57 am
- Location: SERBIA
- Contact:
DC_IsAppRunning() and CRT window
- Attachments
-
- RUNAPP.zip
- (15.14 KiB) Downloaded 20 times
Re: DC_IsAppRunning() and CRT window
Here is another way to do this:
Code: Select all
RunShell('/C TaskList.Exe /V /FO CSV > tasklist.csv' )
aTasks := DC_Csv2Array('tasklist.csv')
nFound := AScan(aTasks,{|a|a[1]=='RUNAPP.EXE'})
nFound := AScan(aTasks,{|a|a[1]=='RUNAPP.EXE'},nFound+1)
IF nFound > 0
Confirmbox(,"PROGRAM HAS ALREADY STARTED" + chr(13)+;
"RESTART IS NOT POSSIBLE" + chr(13)+;
appname(.t.),;
"1 STOP PROGRAM START",;
XBPMB_OK,XBPMB_CRITICAL,XBPMB_SYSMODAL)
QUIT
Else
Confirmbox(,"Instance: "+ Str(nFound) + chr(13)+;
appname(.t.),;
"1 PROGRAM IS STARTED",;
XBPMB_OK,XBPMB_INFORMATION,XBPMB_SYSMODAL)
EndIF
The eXpress train is coming - and it has more cars.