dc_isapprunning()

This forum is for eXpress++ general support.
Post Reply
Message
Author
bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

dc_isapprunning()

#1 Post by bwolfsohn »

Some issues with dc_isapprunning()

the documentation shows an example:

IF DC_IsAppRunning('XbpDialog',,'MYAPP.EXE',.t.)
RETURN .f.
ENDIF


but, this will not run... the second parameter (title) must be used.

if the title doesn't match EXACTLY, it never gets to this code further down in the function:

if !Upper( cTitle ) $ Upper( cWinTitle ) .and. !Upper( cFile ) $ Upper( cWinFile )
Return( .f. )
End

This function now requires an exact match in the title..

a partial match in the title, or using the filename would be a major improvement...

We were hoping to display the appsize in the titlebar after the app name..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: dc_isapprunning()

#2 Post by rdonnay »

If you look at the source code for DC_IsAppRunning() it makes several calls to Windows API functions.

I have not yet found a better way to do this.
The eXpress train is coming - and it has more cars.

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: dc_isapprunning()

#3 Post by bwolfsohn »

rdonnay wrote:If you look at the source code for DC_IsAppRunning() it makes several calls to Windows API functions.

I have not yet found a better way to do this.
the code i included in my response was from the source....

Maybe jimmy will jump in on this one...
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
Auge_Ohr
Posts: 1414
Joined: Wed Feb 24, 2010 3:44 pm

Re: dc_isapprunning()

#4 Post by Auge_Ohr »

bwolfsohn wrote:Maybe jimmy will jump in on this one...
you can try this : WildFindWindow.zip
Attachments
WildFindWindow.zip
need ot4xb
(2.25 KiB) Downloaded 793 times
greetings by OHR
Jimmy

User avatar
Auge_Ohr
Posts: 1414
Joined: Wed Feb 24, 2010 3:44 pm

Re: dc_isapprunning()

#5 Post by Auge_Ohr »

does it help ?

other Solution : get Array of Tasklist and scan for your Application
TASKS.ZIP
pure Xbase++
(6.48 KiB) Downloaded 768 times
Note : c:\exp19\Source\Dclipx\_dcfunct.prg does have same DLL Function !
greetings by OHR
Jimmy

messaoudlazhar
Posts: 42
Joined: Mon Dec 23, 2013 2:10 pm
Contact:

Re: dc_isapprunning()

#6 Post by messaoudlazhar »

Hi,

I use this function and it works very well:
IsApprunning (Namexe, Title, lRestore)
you have the choice between a single parameter (exe Name or Title) or both.


Attached is a text file containing the source, you can adapt it to therefore replace DC_Isaprunning Function

Best regards,

Messaoud Mohamed Lazhar
Attachments
isaprun.zip
(1.64 KiB) Downloaded 734 times

Post Reply