roosiedb
asked on
Using Windows calculator
Hi there,
To use the calculator from Windows, I use the following line:
ShellExecute(0,nil,pchar(' C:\WINDOWS \CALC.EXE' ),nil,nil, sw_shownor mal);
This is working fine...
Now I have the following question: Before I execute this calculator I want to check if there is already an instance active. And if there is already a calculator active then I would like to set the focus on that one. In other words: not opening a new instance anymore. If minimized then (of course) I would like to maximize before setting the focus on the calculator.
Please provide me with a complete example.
Thank you very much!
RoosieDB
To use the calculator from Windows, I use the following line:
ShellExecute(0,nil,pchar('
This is working fine...
Now I have the following question: Before I execute this calculator I want to check if there is already an instance active. And if there is already a calculator active then I would like to set the focus on that one. In other words: not opening a new instance anymore. If minimized then (of course) I would like to maximize before setting the focus on the calculator.
Please provide me with a complete example.
Thank you very much!
RoosieDB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
inthe, did you recieved any mail Notifications form ExEx last 3 days?
hi Cesario,
was just wondering same thing myself.
well i guess Crazyone answered us :)
was just wondering same thing myself.
well i guess Crazyone answered us :)
ASKER
Hi Cesario,
Your solution is working fine, however, I would like to implement your example in my application without changing it everytime when my users are using different languages.
So, if you can send me a solution to solve that issue I would be very happy. But it's not required, because this is already working for me.
Your colleague wrote something like HCalc := FindWindow(SciCalc,nil), but this is not working (error message).
Thank you anyway.
RoosieDB
Your solution is working fine, however, I would like to implement your example in my application without changing it everytime when my users are using different languages.
So, if you can send me a solution to solve that issue I would be very happy. But it's not required, because this is already working for me.
Your colleague wrote something like HCalc := FindWindow(SciCalc,nil), but this is not working (error message).
Thank you anyway.
RoosieDB
Hi RossieDB,
I will try to find a solution today....
Best Regrads
Cesario
I will try to find a solution today....
Best Regrads
Cesario
ASKER
Hi Cesario,
I would be very grateful...
:-)
In other words: Danke sehr !!
RoosieDB
I would be very grateful...
:-)
In other words: Danke sehr !!
RoosieDB
HCalc := FindWindow( SciCalc,nil);