thread184-1819600
Good afternoon everyone... I have these codes in my main program (Init)
WITH thisform
.windowstate = 1
ENDWITH
a = 10
DO FORM ATTMON WITH a
and these one in the form ATTMON init..
LPARAMETERS a
WITH thisform
.windowstate = 0
ENDWITH
DECLARE INTEGER SetForegroundWindow IN WIN32API INTEGER
DECLARE INTEGER GetForegroundWindow IN WIN32API
SetForegroundWindow(thisform.HWnd)
lnHWnd = GetForegroundWindow()
CLEAR DLLS SetForegroundWindow
CLEAR DLLS GetForegroundWindow
If Inlist(lnHWnd,thisform.HWnd,_screen.HWnd,_vfp.HWnd)
Messagebox("Setting the application to run in foreground... Please wait...",0+64+4096,"Attmon",2000)
ENDIF
thisform.text1.SetFocus()
The idea is that, i want my my main program to be minimised first then call FORM ATTMON...but the problem is the focus is not focusing in text1, and even the attmon form is not active... is just showing, i still need to click the form for the cursor to be shown in text1. Please help... thanks...
Good afternoon everyone... I have these codes in my main program (Init)
WITH thisform
.windowstate = 1
ENDWITH
a = 10
DO FORM ATTMON WITH a
and these one in the form ATTMON init..
LPARAMETERS a
WITH thisform
.windowstate = 0
ENDWITH
DECLARE INTEGER SetForegroundWindow IN WIN32API INTEGER
DECLARE INTEGER GetForegroundWindow IN WIN32API
SetForegroundWindow(thisform.HWnd)
lnHWnd = GetForegroundWindow()
CLEAR DLLS SetForegroundWindow
CLEAR DLLS GetForegroundWindow
If Inlist(lnHWnd,thisform.HWnd,_screen.HWnd,_vfp.HWnd)
Messagebox("Setting the application to run in foreground... Please wait...",0+64+4096,"Attmon",2000)
ENDIF
thisform.text1.SetFocus()
The idea is that, i want my my main program to be minimised first then call FORM ATTMON...but the problem is the focus is not focusing in text1, and even the attmon form is not active... is just showing, i still need to click the form for the cursor to be shown in text1. Please help... thanks...