Form VL_SAM029: Query whether Form Should be Closed

LANSA

Form VL_SAM029: Query whether Form Should be Closed
Name: VL_SAM029

Description: The following RDMLX form displays a form that requests the user confirm a close request and allows it be reinterpreted as Close, Minimize of Cancel

Use this form in conjunction with form VL_SAM026.

FUNCTION OPTIONS(*DIRECT);
BEGIN_COM CAPTION('Query Close Request') FORMPOSITION(ScreenCenter) FORMSTYLE(StayOnTop) HEIGHT(193) LEFT(380) TOP(146) WIDTH(293);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_1) CAPTION('Use the Close button to shutdown this application completely.') DISPLAYPOSITION(3) HEIGHT(37) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(3) TABSTOP(False) TOP(8) WIDTH(184);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_2) CAPTION('Use the Minimize button to minimize this application onto your task bar. This will allow you instantly start using this application again simply by clicking on it in the task bar.') DISPLAYPOSITION(2) HEIGHT(86) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(43) WIDTH(185);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_3) CAPTION('Use the Cancel Button to ignore this close request and continue to use your application.') DISPLAYPOSITION(1) HEIGHT(57) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(117) WIDTH(186);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_CLOSE) BUTTONDEFAULT(True) CAPTION('Close') DISPLAYPOSITION(4) LEFT(200) PARENT(#COM_OWNER) TABPOSITION(1) TOP(8);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_MIN) CAPTION('Minimize') DISPLAYPOSITION(5) LEFT(200) PARENT(#COM_OWNER) TABPOSITION(2) TOP(64);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_CNL) CAPTION('Cancel') DISPLAYPOSITION(6) LEFT(200) PARENT(#COM_OWNER) TABPOSITION(3) TOP(120);
;
DEFINE_COM CLASS(#STD_CODE) NAME(#OPTION) CASE(UpperCase) ;
Define_Pty Result Get(GetOption) ;
;
EVTROUTINE HANDLING(#COM_OWNER.Initialize) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS);
Set #Option Value(CLS);
ENDROUTINE ;
;
PtyRoutine GetOption;
Define_Map *output #std_code #p1;
Set #p1 Value(#Option.Value);
EndRoutine;
;
MthRoutine ConfirmClose;
Invoke #Com_Owner.ShowModalForm;
EndRoutine;
;
EVTROUTINE HANDLING(#BTN_CLOSE.Click);
Set #Option Value(CLS);
Set #Com_Owner ModalResult(ok);
ENDROUTINE;
;
EVTROUTINE HANDLING(#BTN_MIN.Click);
Set #Option Value(MIN);
Set #Com_Owner ModalResult(ok);
ENDROUTINE;
;
EVTROUTINE HANDLING(#BTN_CNL.Click);
Set #Option Value(CNL);
Set #Com_Owner ModalResult(ok);
ENDROUTINE;
END_COM ;