Form S_155FHL: Help About Dialog
Name: S_155FHL
Description: The following RDMLX form is part of the BASE_xxxx series of examples that have been designed to provide you with base examples of common layout and functionality that you may choose to reuse when constructing your own applications.
* ==========================================================;
;
* This component is a an example of a generic "About" panel.;
;
* It has a method named UShow that shows the help panel.;
;
* It has a method named uClose that closes any active help panel.;
;
* ==========================================================;
;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM FORMPOSITION(ScreenCenter) FORMSTYLE(StayOnTop) FRAMESTYLE(ToolWindow) HEIGHT(279) LEFT(288) TITLEBARVISIBLE(False) TOP(302) VISUALSTYLE(#VS_PANEL) WIDTH(514);
DEFINE_COM CLASS(#PRIM_IMGE) NAME(#IMAGE) DISPLAYPOSITION(5) HEIGHT(105) IMAGEHEIGHT(188) IMAGEWIDTH(301) LEFT(16) PARENT(#PANL_1) TABPOSITION(5) TABSTOP(False) TOP(16) VISUALSTYLE(#VS_PANEL) VISUALSTYLEOFPARENT(False) WIDTH(145);
DEFINE_COM CLASS(#PRIM_LBCL) NAME(#LBCL_1) DISPLAYPOSITION(1) SOURCE(#STD_TEXTS) WIDTH(20);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#PRODGRID) COLUMNHEADERS(False) DISPLAYPOSITION(7) HEIGHT(85) LEFT(167) PARENT(#PANL_1) TABPOSITION(6) TABSTOP(False) TOP(35) VISUALSTYLE(#VS_NOREAD) WIDTH(322);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) DISPLAYPOSITION(1) PARENT(#PRODGRID) SOURCE(#STD_TEXTS) WIDTH(30);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) DISPLAYPOSITION(2) PARENT(#PRODGRID) SOURCE(#STD_TEXT) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_STTC) NAME(#STTC_1) DISPLAYPOSITION(4) DRAWTYPE(LineHorizontalEdge) HEIGHT(9) LEFT(16) PARENT(#PANL_1) TABPOSITION(2) TABSTOP(False) TOP(130) VISUALSTYLEOFPARENT(False) WIDTH(473);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#PRODNAME) CAPTION('<text>') DISPLAYPOSITION(6) HEIGHT(14) LEFT(168) PARENT(#PANL_1) TABPOSITION(8) TABSTOP(False) TOP(16) VISUALSTYLE(#VS_EMPH) VISUALSTYLEOFPARENT(False) WIDTH(321);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#COPYWARN) CAPTION('Warning : This computer program is protected by copyright law and international treaties. Unauthorized reproduction or distribution of this program, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law. ') DISPLAYPOSITION(8) HEIGHT(65) LEFT(24) PARENT(#PANL_1) TABPOSITION(7) TABSTOP(False) TOP(152) VISUALSTYLE(#VS_NORM) VISUALSTYLEOFPARENT(False) WIDTH(361);
;
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_OK) BUTTONDEFAULT(True) CAPTION('OK') DISPLAYPOSITION(2) LEFT(408) PARENT(#PANL_1) TABPOSITION(4) TOP(144) VISUALSTYLE(#VS_NORM) VISUALSTYLEOFPARENT(False) WIDTH(85);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_SY) CAPTION('&System Info ...') DISPLAYPOSITION(1) LEFT(408) PARENT(#PANL_1) TABPOSITION(3) TOP(172) VISUALSTYLE(#VS_NORM) WIDTH(85);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_TS) CAPTION('&Tech Support ...') DISPLAYPOSITION(3) LEFT(408) PARENT(#PANL_1) TABPOSITION(1) TOP(200) VISUALSTYLE(#VS_NORM) WIDTH(85);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#PANL_1) DISPLAYPOSITION(1) HEIGHT(249) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(505);
;
* Bitmap image to be used in image area (assumed to be in partition source directory);
;
Define #UseImage RefFld(#Std_Textl) Default('lansa2.bmp');
;
* Web address of technical support for product ;
;
Define #TechSup RefFld(#Std_Textl) default('www.lansa.com') ;
Def_Cond *TechSup '#TechSup *Ne *blanks';
;
* System information details ;
;
Define #SysInfo RefFld(#Sysvar$Av) default(*blanks);
Def_Cond *SysInfo '#SysInfo *ne *blanks';
;
* Other work variables and conditions ;
;
Define #OSRetCode RefFld(#Std_Num);
Define #RLRetCode *Char 2;
;
;
* ==========================================================;
* Handle instance creation ;
* ==========================================================;
;
EVTROUTINE HANDLING(#Com_Owner.CreateInstance);
Change #Std_Num '#Panl_1.Height + 2';
Set #Com_Owner Height(#Std_Num) ;
Change #Std_Num '#Panl_1.Width + 2';
Set #Com_Owner Width(#Std_Num) ;
EndRoutine;
;
* ==========================================================;
* Handle form initialization ;
* ==========================================================;
;
EVTROUTINE HANDLING(#Com_Owner.Initialize);
;
* Load the image ;
;
Use tconcat (*part_dir_source #UseImage) (#sysvar$av);
Set #image filename(#sysvar$av);
;
* Insert product details into the grid and on the panel;
;
Set #ProdName Caption('XXXXXXXXXXXXXXXXXXXXXXX') ;
Set #Com_Owner Caption('About XXXXXXXXXXXXXXXXXXXXXXX') ;
Execute AddItem ('Version' 'n.nn');
Execute AddItem ('Build Number' 'nnnn');
Execute AddItem ('(C) Copyright' 'XXXXXXXXXXXXXXXXXXX, 1999');
Execute AddItem ('Licence Number' 'nnnnnnnnnnnnnn');
Execute AddItem ('Licenced To' 'XXXXXXXXXXXXXXXXXXXXX') ;
;
* Try and load system informtion details;
;
Use builtin(get_registry_value) with_args(HKEY_LOCAL_MACHINE 'SOFTWARE\Microsoft\Shared Tools\MSInfo' 'Path') TO_GET(#SYSINFO #RLRETCODE);
Set #PhBn_Sy Enabled(*SysInfo) ;
Set #PhBn_Ts Enabled(*TechSup) ;
Invoke #PHBn_OK.SetFocus ;
;
ENDROUTINE;
;
Subroutine AddItem ((#Std_Texts *received)(#Std_Text *Received));
Add_Entry #ProdGrid;
EndRoutine;
;
* ==========================================================;
* Handle a show request ;
* ==========================================================;
;
MTHROUTINE UShow;
Invoke #Com_Owner.RestoreForm ;
Invoke #Com_Owner.ShowModalForm ;
Invoke #Com_Owner.CloseForm ;
ENDROUTINE;
;
* ==========================================================;
* Handle a Close request ;
* ==========================================================;
;
MTHROUTINE UClose;
Invoke #Com_Owner.CloseForm ;
ENDROUTINE;
;
* ==========================================================;
* Handle the OK button ;
* ==========================================================;
;
EVTROUTINE HANDLING(#PHBN_OK.Click);
Invoke #Com_Owner.UClose ;
ENDROUTINE;
;
* ==========================================================;
* Handle system information button ;
* ==========================================================;
;
EVTROUTINE HANDLING(#PHBN_Sy.Click);
Use builtin(ov_system_service) with_args(Start #sysinfo) ;
ENDROUTINE;
;
* ==========================================================;
* Handle technival support button ;
* ==========================================================;
;
EVTROUTINE HANDLING(#PHBN_Ts.Click);
Use builtin(system_command) with_args(h #techsup) to_get(#osretcode);
ENDROUTINE;
;
END_COM;
Name: S_155FHL
Description: The following RDMLX form is part of the BASE_xxxx series of examples that have been designed to provide you with base examples of common layout and functionality that you may choose to reuse when constructing your own applications.
* ==========================================================;
;
* This component is a an example of a generic "About" panel.;
;
* It has a method named UShow that shows the help panel.;
;
* It has a method named uClose that closes any active help panel.;
;
* ==========================================================;
;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM FORMPOSITION(ScreenCenter) FORMSTYLE(StayOnTop) FRAMESTYLE(ToolWindow) HEIGHT(279) LEFT(288) TITLEBARVISIBLE(False) TOP(302) VISUALSTYLE(#VS_PANEL) WIDTH(514);
DEFINE_COM CLASS(#PRIM_IMGE) NAME(#IMAGE) DISPLAYPOSITION(5) HEIGHT(105) IMAGEHEIGHT(188) IMAGEWIDTH(301) LEFT(16) PARENT(#PANL_1) TABPOSITION(5) TABSTOP(False) TOP(16) VISUALSTYLE(#VS_PANEL) VISUALSTYLEOFPARENT(False) WIDTH(145);
DEFINE_COM CLASS(#PRIM_LBCL) NAME(#LBCL_1) DISPLAYPOSITION(1) SOURCE(#STD_TEXTS) WIDTH(20);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#PRODGRID) COLUMNHEADERS(False) DISPLAYPOSITION(7) HEIGHT(85) LEFT(167) PARENT(#PANL_1) TABPOSITION(6) TABSTOP(False) TOP(35) VISUALSTYLE(#VS_NOREAD) WIDTH(322);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) DISPLAYPOSITION(1) PARENT(#PRODGRID) SOURCE(#STD_TEXTS) WIDTH(30);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) DISPLAYPOSITION(2) PARENT(#PRODGRID) SOURCE(#STD_TEXT) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_STTC) NAME(#STTC_1) DISPLAYPOSITION(4) DRAWTYPE(LineHorizontalEdge) HEIGHT(9) LEFT(16) PARENT(#PANL_1) TABPOSITION(2) TABSTOP(False) TOP(130) VISUALSTYLEOFPARENT(False) WIDTH(473);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#PRODNAME) CAPTION('<text>') DISPLAYPOSITION(6) HEIGHT(14) LEFT(168) PARENT(#PANL_1) TABPOSITION(8) TABSTOP(False) TOP(16) VISUALSTYLE(#VS_EMPH) VISUALSTYLEOFPARENT(False) WIDTH(321);
DEFINE_COM CLASS(#PRIM_LABL) NAME(#COPYWARN) CAPTION('Warning : This computer program is protected by copyright law and international treaties. Unauthorized reproduction or distribution of this program, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under the law. ') DISPLAYPOSITION(8) HEIGHT(65) LEFT(24) PARENT(#PANL_1) TABPOSITION(7) TABSTOP(False) TOP(152) VISUALSTYLE(#VS_NORM) VISUALSTYLEOFPARENT(False) WIDTH(361);
;
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_OK) BUTTONDEFAULT(True) CAPTION('OK') DISPLAYPOSITION(2) LEFT(408) PARENT(#PANL_1) TABPOSITION(4) TOP(144) VISUALSTYLE(#VS_NORM) VISUALSTYLEOFPARENT(False) WIDTH(85);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_SY) CAPTION('&System Info ...') DISPLAYPOSITION(1) LEFT(408) PARENT(#PANL_1) TABPOSITION(3) TOP(172) VISUALSTYLE(#VS_NORM) WIDTH(85);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_TS) CAPTION('&Tech Support ...') DISPLAYPOSITION(3) LEFT(408) PARENT(#PANL_1) TABPOSITION(1) TOP(200) VISUALSTYLE(#VS_NORM) WIDTH(85);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#PANL_1) DISPLAYPOSITION(1) HEIGHT(249) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(505);
;
* Bitmap image to be used in image area (assumed to be in partition source directory);
;
Define #UseImage RefFld(#Std_Textl) Default('lansa2.bmp');
;
* Web address of technical support for product ;
;
Define #TechSup RefFld(#Std_Textl) default('www.lansa.com') ;
Def_Cond *TechSup '#TechSup *Ne *blanks';
;
* System information details ;
;
Define #SysInfo RefFld(#Sysvar$Av) default(*blanks);
Def_Cond *SysInfo '#SysInfo *ne *blanks';
;
* Other work variables and conditions ;
;
Define #OSRetCode RefFld(#Std_Num);
Define #RLRetCode *Char 2;
;
;
* ==========================================================;
* Handle instance creation ;
* ==========================================================;
;
EVTROUTINE HANDLING(#Com_Owner.CreateInstance);
Change #Std_Num '#Panl_1.Height + 2';
Set #Com_Owner Height(#Std_Num) ;
Change #Std_Num '#Panl_1.Width + 2';
Set #Com_Owner Width(#Std_Num) ;
EndRoutine;
;
* ==========================================================;
* Handle form initialization ;
* ==========================================================;
;
EVTROUTINE HANDLING(#Com_Owner.Initialize);
;
* Load the image ;
;
Use tconcat (*part_dir_source #UseImage) (#sysvar$av);
Set #image filename(#sysvar$av);
;
* Insert product details into the grid and on the panel;
;
Set #ProdName Caption('XXXXXXXXXXXXXXXXXXXXXXX') ;
Set #Com_Owner Caption('About XXXXXXXXXXXXXXXXXXXXXXX') ;
Execute AddItem ('Version' 'n.nn');
Execute AddItem ('Build Number' 'nnnn');
Execute AddItem ('(C) Copyright' 'XXXXXXXXXXXXXXXXXXX, 1999');
Execute AddItem ('Licence Number' 'nnnnnnnnnnnnnn');
Execute AddItem ('Licenced To' 'XXXXXXXXXXXXXXXXXXXXX') ;
;
* Try and load system informtion details;
;
Use builtin(get_registry_value) with_args(HKEY_LOCAL_MACHINE 'SOFTWARE\Microsoft\Shared Tools\MSInfo' 'Path') TO_GET(#SYSINFO #RLRETCODE);
Set #PhBn_Sy Enabled(*SysInfo) ;
Set #PhBn_Ts Enabled(*TechSup) ;
Invoke #PHBn_OK.SetFocus ;
;
ENDROUTINE;
;
Subroutine AddItem ((#Std_Texts *received)(#Std_Text *Received));
Add_Entry #ProdGrid;
EndRoutine;
;
* ==========================================================;
* Handle a show request ;
* ==========================================================;
;
MTHROUTINE UShow;
Invoke #Com_Owner.RestoreForm ;
Invoke #Com_Owner.ShowModalForm ;
Invoke #Com_Owner.CloseForm ;
ENDROUTINE;
;
* ==========================================================;
* Handle a Close request ;
* ==========================================================;
;
MTHROUTINE UClose;
Invoke #Com_Owner.CloseForm ;
ENDROUTINE;
;
* ==========================================================;
* Handle the OK button ;
* ==========================================================;
;
EVTROUTINE HANDLING(#PHBN_OK.Click);
Invoke #Com_Owner.UClose ;
ENDROUTINE;
;
* ==========================================================;
* Handle system information button ;
* ==========================================================;
;
EVTROUTINE HANDLING(#PHBN_Sy.Click);
Use builtin(ov_system_service) with_args(Start #sysinfo) ;
ENDROUTINE;
;
* ==========================================================;
* Handle technival support button ;
* ==========================================================;
;
EVTROUTINE HANDLING(#PHBN_Ts.Click);
Use builtin(system_command) with_args(h #techsup) to_get(#osretcode);
ENDROUTINE;
;
END_COM;