Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Today's Messages (on)  | Unanswered Messages (off)

Forum: Newbie corner
 Topic: check if application is running
Re: check if application is running [message #55644 is a reply to message #55633] Fri, 27 November 2020 02:55
BetoValle is currently offline  BetoValle
Messages: 43
Registered: September 2020
Location: Brasil Valinhos SP
Member
Hi,

thanks but that's not what I'm looking for. See the first need is to search the
an application running on windows, so that it does not load it "again",
and also bring it in front of all the others.

my application, loads another "java" application. In the java application there is already the same content as the one you suggested ie loading a single instance. So my goal is that the C ++ application before loading the java application, evaluate it and if it is loaded then bring it forward.

How would I use a "findWindow" function that I could search among those that are eventually open (as the task manager displays), to evaluate this. I did not identify among the existing functions in U ++ a "findWindow" function but I believe that something like this:

          HWND = findWindow ("title of the java application");
          if HWND not null or exist -> HWND-> bringToFront ();

Re: check if application is running [message #55646 is a reply to message #55644] Fri, 27 November 2020 08:44
koldo is currently offline  koldo
Messages: 3231
Registered: August 2008
Senior Veteran
Hi BetoValle

You can try Bazaar/SysInfo GetWindowsList() or GetProcessList() functions to see if the application is opened and get a handler to it, and after that calling Window_TopMost() to bring it to front.


Best regards
Iñaki
Forum: U++ community news and announcements
 Topic: FindFile range-loop support
Re: FindFile range-loop support [message #55645 is a reply to message #55631] Fri, 27 November 2020 08:37
koldo is currently offline  koldo
Messages: 3231
Registered: August 2008
Senior Veteran
I have just included it in one project. Two lines of code less Smile per FindFile loop.

Best regards
Iñaki
 Topic: ide: Open Terminal at...
ide: Open Terminal at... [message #55648] Fri, 27 November 2020 11:46
mirek is currently offline  mirek
Messages: 12951
Registered: November 2005
Ultimate Member
at package folder
at file folder
at output directory folder

PATH is carried over from the active build method...

Mirek
Forum: U++ Developers corner
 Topic: Should be GUI_APP_MAIN or CONSOLE_APP_MAIN ignored in non-main package?
Re: Should be GUI_APP_MAIN or CONSOLE_APP_MAIN ignored in non-main package? [message #55647 is a reply to message #55643] Fri, 27 November 2020 08:45
koldo is currently offline  koldo
Messages: 3231
Registered: August 2008
Senior Veteran
mr_ped wrote on Thu, 26 November 2020 19:13
I'm doing that when using unit testing, which has its own main, running the test runner. (by #ifndef .. #endif preprocessor block, IIRC).

I do just the same.


Best regards
Iñaki
Re: Should be GUI_APP_MAIN or CONSOLE_APP_MAIN ignored in non-main package? [message #55649 is a reply to message #55647] Fri, 27 November 2020 11:48
mirek is currently offline  mirek
Messages: 12951
Registered: November 2005
Ultimate Member
Yeah, thanks that you have the same issue:)

Does not quite reply my question:

Should it be excluded by the U++, without the need for #ifdef? Do you see any catch?

Mirek



Current Time: Fri Nov 27 18:12:18 CET 2020

Total time taken to generate the page: 0.01338 seconds