I have a startup application which starts my main application via runshell.
As soon as user entered his login credentials in the startup application, I send it to the main application and this continues.
This is working correct, but my main application doesn't come to front.
The main application is waiting for a file to proceed. As soon as it sees the file, it creates his main window. In the avel of the dcread I have a call to a tofront(cTitle) funtion which is as follows:
Code: Select all
function tofront(cTitle)
Local hWndDlg := DllCall( "User32.dll", DLL_STDCALL, "FindWindowA", 0, cTitle )
IF !( hWndDlg == 0 )
DllCall( "User32.dll", DLL_STDCALL, "SetForegroundWindow", hWndDlg )
DllCall( "User32.dll", DLL_STDCALL, "BringWindowToTop", hWndDlg )
DllCall( "User32.dll", DLL_STDCALL, "ShowWindow", hWndDlg, 1 )
DllCall( "User32.dll", DLL_STDCALL, "UpdateWindow", hWndDlg )
ENDIF
return nil
Any ideas?