Dear All,
I cannot find this topic, it might off topic.
I want to activate the minimized program from system tray. It means "Allow to run program once only".
Regards,
Dutch
How to activate minimized program?
How to activate minimized program?
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
- Enrico Maria Giordano
- Posts: 8736
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 1 time
- Contact:
Re: How to activate minimized program?
Dear EMG,
I'm sorry to explain unclearly. I need to activate the program when the user dblclick on shortcut if program has been minimized. It will protect the user open program more than one.
Regards,
Dutch
I'm sorry to explain unclearly. I need to activate the program when the user dblclick on shortcut if program has been minimized. It will protect the user open program more than one.
Regards,
Dutch
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Re: How to activate minimized program?
Hello, Dutch!
In my programs I did it such way:
in the start of program. And this is function PPP:
Where "Clinical examination" is the name of main window in program.
In my programs I did it such way:
Code: Select all | Expand
if IsExeRunning( 'dispan.exe' ).or.IsExeRunning( 'Dispan.exe' ).or.IsExeRunning( 'DISPAN.exe' ).or.IsExeRunning('DISPAN.EXE' )
if pppp()==1
msgstop('Program is already running.','Ups...')
endif
return .f.
endif
in the start of program. And this is function PPP:
Code: Select all | Expand
#PRAGMA BEGINDUMP
#include "Windows.h"
#include "ClipApi.h"
HB_FUNC( PPPP )
{
HWND hWnd;
if (hWnd=FindWindow(NULL,"Clinical examination""))
{
ShowWindow(hWnd,SW_RESTORE);
SetForegroundWindow(hWnd);
_retni(0);
}
_retni(1);
}
#PRAGMA ENDDUMP
Where "Clinical examination" is the name of main window in program.
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
- RAMESHBABU
- Posts: 626
- Joined: Fri Oct 21, 2005 5:54 am
- Location: Secunderabad (T.S), India
Re: How to activate minimized program?
Hi Mr.Dutch,
Even the following code also works.
- Ramesh Babu P
Even the following code also works.
Code: Select all | Expand
SetForeGroundWindow(oWnd)
***************************************************************************************************
*** SetForeGroundWindow( hWnd ) to Bring the Minimised window to ForeGround ***
*** When the user try to execute it again ***
***************************************************************************************************
DLL32 FUNCTION SetForeGroundWindow( hWnd AS LONG ) AS BOOL;
PASCAL FROM "SetForegroundWindow" LIB "user32.dll"
- Ramesh Babu P
- nageswaragunupudi
- Posts: 10711
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 7 times
- Contact:
Re: How to activate minimized program?
Mr Dutch
The above suggestions are good.
You may also like to see "showapp.prg" in the samples folder of fwh.
This sample program answers your requirement exactly
The above suggestions are good.
You may also like to see "showapp.prg" in the samples folder of fwh.
This sample program answers your requirement exactly
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: How to activate minimized program?
Dear Rao and All,
Thanks, all solution is working great. ShowApp.prg is the one that I'm looking for.
Regards,
Dutch
Thanks, all solution is working great. ShowApp.prg is the one that I'm looking for.
Regards,
Dutch
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)