how to activate the window?
Publicado: Mié May 09, 2018 9:01 pm
If I minimize Form1 to instantiate and display Form2, the window is displayed but without giving the focus, it is necessary to click.
Original test:
other unsuccessful attempts:
In form2:
more information:
1-the onActive event was run
2-the edit displays the cursor blinking (and the form is not active)
Original test:
Código: Seleccionar todo
METHOD Button1Click( oSender ) CLASS TForm1
::Minimize()
with object TForm2():New(self)
:ShowModal()
end with
::Restore()
RETURN Nil
Código: Seleccionar todo
METHOD Button1Click( oSender ) CLASS TForm1
with object TForm2():New(self)
::Minimize()
:setFocus()
:ShowModal()
end with
::Restore()
RETURN Nil
Código: Seleccionar todo
METHOD FormInitialize( oSender ) CLASS TForm2
LogDebug(Application:oActiveForm:className) // TForm1
::oEdit1:SetFocus()
RETURN Nil
1-the onActive event was run
2-the edit displays the cursor blinking (and the form is not active)
Código: Seleccionar todo
METHOD FormActivate( oSender, oCtl ) CLASS TForm2
LogDebug( 'active' )
RETURN Nil