not to open the same exe I have always done this way (it seems to me that the source is EMG)
the function
now a strange thing happens to me that is
before accessing the application I do enter the access login for the users of the system
Let's imagine that the user gets distracted and opens the exe again
then we would have this situation

ie it displays me the message that the application is already running
but then it happens that it still opens the main window as if it were another section then we would have this situation

how should i do to avoid making the main window appear?
because it's very strange because I active the Main window on TApplication and on method Activate() where is the dialog of check login
when I show the login and a user enters I go to load a series of parameters for that user,
for example access to programs that are activated from the menu or from the buttonbar if I used
on method Activate()
::bInit := { || IIF(::CheckLogin(),,::ExitFromSource()) }
it can run but then I have problems because the buttonbar and the menu are allready load without the paramters I want for that user
# define NOME_PROGRAMMA_TITLE "Winbeach"
Function Main()
...
IF ISEXERUNNING( CFILENAME( HB_ARGV( 0 ) ) )
MsgWait(NOME_PROGRAMMA_TITLE+" è già in esecuzione !","Attenzione")
SHOWWINDOW( FINDWND( NOME_PROGRAMMA_TITLE ), 9 )
SETFOREGROUNDWINDOW( FINDWND( NOME_PROGRAMMA_TITLE ) )
RETURN NIL
ENDIF
WITH OBJECT oApp := TApplication():New()
:Activate()
ENDthe function
FUNCTION FINDWND( cTitle )
LOCAL hWnd := GETWINDOW( GETDESKTOPWINDOW(), GW_CHILD )
WHILE hWnd != 0
IF UPPER( cTitle ) $ UPPER( GETWINDOWTEXT( hWnd ) )
RETURN hWnd
ENDIF
hWnd = GETWINDOW( hWnd, GW_HWNDNEXT )
ENDDO
RETURN NILnow a strange thing happens to me that is
before accessing the application I do enter the access login for the users of the system
Let's imagine that the user gets distracted and opens the exe again
then we would have this situation

ie it displays me the message that the application is already running
but then it happens that it still opens the main window as if it were another section then we would have this situation

how should i do to avoid making the main window appear?
because it's very strange because I active the Main window on TApplication and on method Activate() where is the dialog of check login
method Activate() class TApplication
IF ::CheckLogin()
GetWinCoors( ::oWndMain, ::cInifile )
* Get_Modules(::cInifile)
::oWndMain:bResized := {|| ResizeWndMain() }
::oWndMain:aMinMaxInfo := { nil, nil, ,, 1130,650, , }
ACTIVATE WINDOW ::oWndMain ;
VALID ::ExitFromX()
ENDIFwhen I show the login and a user enters I go to load a series of parameters for that user,
for example access to programs that are activated from the menu or from the buttonbar if I used
on method Activate()
::bInit := { || IIF(::CheckLogin(),,::ExitFromSource()) }
it can run but then I have problems because the buttonbar and the menu are allready load without the paramters I want for that user
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
