Form VL_SAM084: Favorite/Common Activity
Name: VL_SAM084
Description: The following RDMLX form is used to demonstrate how a desktop favorite / common activity manager can be created. This form uses form VL_SAM085.
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM HEIGHT(402) LAYOUTMANAGER(#LAYOUT) LEFT(16) TOP(16) WIDTH(112);
DEFINE_COM CLASS(#PRIM_LTBX) NAME(#LISTBOX) DISPLAYPOSITION(1) HEIGHT(366) INTEGRALHEIGHT(False) LEFT(1) PARENT(#COM_OWNER) POPUPMENU(#PMNU_1) TABPOSITION(1) TOP(1) WIDTH(102);
DEFINE_COM CLASS(#PRIM_LBCL) NAME(#LBCL_1) DISPLAYPOSITION(1) PARENT(#LISTBOX) SORTPOSITION(1) SOURCE(#STD_TEXTS) WIDTH(20);
DEFINE_COM CLASS(#PRIM_LBCL) NAME(#LBCL_2) PARENT(#LISTBOX) SOURCE(#STD_TEXTL) VISIBLE(False) WIDTH(20);
;
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#LAYOUT);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#IL201) MANAGE(#LISTBOX) MARGINBOTTOM(1) MARGINLEFT(1) MARGINRIGHT(1) MARGINTOP(1) PARENT(#LAYOUT);
DEFINE_COM CLASS(#PRIM_PMNU) NAME(#PMNU_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_1) CAPTION('Invoke') DISPLAYPOSITION(1) PARENT(#PMNU_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_2) CAPTION('Edit') DISPLAYPOSITION(2) PARENT(#PMNU_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_3) CAPTION('New ') DISPLAYPOSITION(3) PARENT(#PMNU_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_4) CAPTION('Delete ') DISPLAYPOSITION(4) PARENT(#PMNU_1);
DEFINE_COM CLASS(#VL_SAM085) NAME(#VL_SAM085);
;
Define #Top RefFld(#Std_Num);
Define #Left RefFld(#Std_Num);
Define #Height RefFld(#Std_Num);
Define #Width RefFld(#Std_Num);
;
EVTROUTINE handling(#com_owner.Initialize);
Execute Defaults;
Change (#Top #Left #Width #Height) *Remembered_value_for_User;
Set #Com_Owner Top(#Top) Left(#Left) Width(#Width) Height(#Height) ;
Execute LoadCmds;
ENDROUTINE ;
;
Subroutine LoadCmds;
Define #FileName *char 100;
Define #RetCode *char 2;
Change #FileName *Part_Dir_Execute;
Use TConcat (#FileName *component '.DAT' ) #FileName;
Clr_List #ListBox;
use builtin(transform_file) with_args(#listbox #filename t) to_get(#retcode);
Change (#Std_Texts #Std_Textl) *blanks;
EndRoutine ;
;
EvtRoutine Handling(#MItm_1.Click);
Define #OSRCode RefFld(#Std_Num);
if '#Std_Textl *ne *blanks';
Use System_Command (H #Std_TextL) (#OSRCode);
Endif ;
EndRoutine ;
;
EvtRoutine Handling(#MItm_2.Click);
if '#Std_Textl *ne *blanks';
Invoke #VL_Sam085.EditCommand Desc(#Std_Texts) Cmd(#Std_Textl) StoreFile(*Component);
Endif ;
EndRoutine ;
;
EvtRoutine Handling(#MItm_3.Click);
Invoke #VL_Sam085.NewCommand StoreFile(*Component);
EndRoutine ;
;
EvtRoutine Handling(#MItm_4.Click);
if '#Std_Textl *ne *blanks';
Invoke #VL_Sam085.DeleteCommand Desc(#Std_Texts) StoreFile(*Component);
Endif ;
EndRoutine ;
;
EvtRoutine Handling(#VL_SAM085.CmdFileUpdated);
Execute LoadCmds;
EndRoutine ;
;
EvtRoutine Handling(#Com_Owner.Closing);
if '#Com_Owner.WindowState = Normal';
Change #Top #Com_Owner.Top ;
Change #Left #Com_Owner.Left ;
Change #Width #Com_Owner.Width ;
Change #Height #Com_Owner.Height ;
Else ;
Execute Defaults;
Endif ;
EndRoutine ;
;
Subroutine Defaults;
Change (#Top #Left) 1;
Change #Height 400;
Change #Width 115;
Endroutine ;
;
END_COM ;
Name: VL_SAM084
Description: The following RDMLX form is used to demonstrate how a desktop favorite / common activity manager can be created. This form uses form VL_SAM085.
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM HEIGHT(402) LAYOUTMANAGER(#LAYOUT) LEFT(16) TOP(16) WIDTH(112);
DEFINE_COM CLASS(#PRIM_LTBX) NAME(#LISTBOX) DISPLAYPOSITION(1) HEIGHT(366) INTEGRALHEIGHT(False) LEFT(1) PARENT(#COM_OWNER) POPUPMENU(#PMNU_1) TABPOSITION(1) TOP(1) WIDTH(102);
DEFINE_COM CLASS(#PRIM_LBCL) NAME(#LBCL_1) DISPLAYPOSITION(1) PARENT(#LISTBOX) SORTPOSITION(1) SOURCE(#STD_TEXTS) WIDTH(20);
DEFINE_COM CLASS(#PRIM_LBCL) NAME(#LBCL_2) PARENT(#LISTBOX) SOURCE(#STD_TEXTL) VISIBLE(False) WIDTH(20);
;
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#LAYOUT);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#IL201) MANAGE(#LISTBOX) MARGINBOTTOM(1) MARGINLEFT(1) MARGINRIGHT(1) MARGINTOP(1) PARENT(#LAYOUT);
DEFINE_COM CLASS(#PRIM_PMNU) NAME(#PMNU_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_1) CAPTION('Invoke') DISPLAYPOSITION(1) PARENT(#PMNU_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_2) CAPTION('Edit') DISPLAYPOSITION(2) PARENT(#PMNU_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_3) CAPTION('New ') DISPLAYPOSITION(3) PARENT(#PMNU_1);
DEFINE_COM CLASS(#PRIM_MITM) NAME(#MITM_4) CAPTION('Delete ') DISPLAYPOSITION(4) PARENT(#PMNU_1);
DEFINE_COM CLASS(#VL_SAM085) NAME(#VL_SAM085);
;
Define #Top RefFld(#Std_Num);
Define #Left RefFld(#Std_Num);
Define #Height RefFld(#Std_Num);
Define #Width RefFld(#Std_Num);
;
EVTROUTINE handling(#com_owner.Initialize);
Execute Defaults;
Change (#Top #Left #Width #Height) *Remembered_value_for_User;
Set #Com_Owner Top(#Top) Left(#Left) Width(#Width) Height(#Height) ;
Execute LoadCmds;
ENDROUTINE ;
;
Subroutine LoadCmds;
Define #FileName *char 100;
Define #RetCode *char 2;
Change #FileName *Part_Dir_Execute;
Use TConcat (#FileName *component '.DAT' ) #FileName;
Clr_List #ListBox;
use builtin(transform_file) with_args(#listbox #filename t) to_get(#retcode);
Change (#Std_Texts #Std_Textl) *blanks;
EndRoutine ;
;
EvtRoutine Handling(#MItm_1.Click);
Define #OSRCode RefFld(#Std_Num);
if '#Std_Textl *ne *blanks';
Use System_Command (H #Std_TextL) (#OSRCode);
Endif ;
EndRoutine ;
;
EvtRoutine Handling(#MItm_2.Click);
if '#Std_Textl *ne *blanks';
Invoke #VL_Sam085.EditCommand Desc(#Std_Texts) Cmd(#Std_Textl) StoreFile(*Component);
Endif ;
EndRoutine ;
;
EvtRoutine Handling(#MItm_3.Click);
Invoke #VL_Sam085.NewCommand StoreFile(*Component);
EndRoutine ;
;
EvtRoutine Handling(#MItm_4.Click);
if '#Std_Textl *ne *blanks';
Invoke #VL_Sam085.DeleteCommand Desc(#Std_Texts) StoreFile(*Component);
Endif ;
EndRoutine ;
;
EvtRoutine Handling(#VL_SAM085.CmdFileUpdated);
Execute LoadCmds;
EndRoutine ;
;
EvtRoutine Handling(#Com_Owner.Closing);
if '#Com_Owner.WindowState = Normal';
Change #Top #Com_Owner.Top ;
Change #Left #Com_Owner.Left ;
Change #Width #Com_Owner.Width ;
Change #Height #Com_Owner.Height ;
Else ;
Execute Defaults;
Endif ;
EndRoutine ;
;
Subroutine Defaults;
Change (#Top #Left) 1;
Change #Height 400;
Change #Width 115;
Endroutine ;
;
END_COM ;