Its a mixed GuiConsole program...
Entering data at console( Dos) and assign at other forms,
but lost the focus on the console. How to setfocus to the console(Dos)
back ?
SSW :
Code: Select all
#include <hmg.ch>
REQUEST HB_GT_WIN_DEFAULT && GT_WIN OR GT_GUI
Function Main
MEMVAR _HMG_SYSDATA
DEFINE WINDOW Main ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 400 ;
TITLE "New Form" ;
WINDOWTYPE MAIN
@ 100, 100 BUTTON btnButton CAPTION "NewDosForm" ACTION NewDosForm()
END WINDOW
NewForm()
Main.Center
Main.Activate
Return NIL
FUNCTION SetNewForm( cName)
DECLARE WINDOW NewForm
*-
IF .NOT. IsWindowActive( NewForm)
NewForm.SHOW
ENDIF
*-
NewForm.txtTextBox.Value := "How are you : " + cName
RETURN NIL
FUNCTION NewForm()
DEFINE WINDOW NewForm ;
AT 0,0 ;
WIDTH 200 ;
HEIGHT 200 ;
TITLE "New Form" ;
WINDOWTYPE CHILD
@ 10, 10 TEXTBOX txtTextBox VALUE "This is New Form"
END WINDOW
RETURN NIL
FUNCTION NewDosForm()
LOCAL cName, cAddress
MEMVAR _HMG_SYSDATA, GETLIST
THISWINDOW.HIDE
SetMode( 25, 80)
? "Hello World "
cName := "Chang"
@ 10, 10 SAY "Enter name :" GET cName
READ
SetNewForm( cName)
cAddress := SPACE( 30)
@ 12, 10 SAY "Returning..."
@ 14, 10 SAY "Enter Address :" GET cAddress
READ
THISWINDOW.SHOW
THISWINDOW.SETFOCUS
RETURN NIL
best rgds,
Chang