Form S_155FLG: Application Logo Display

LANSA

Form S_155FLG: Application Logo Display
Name: S_155FLG

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 form is used to present a standard logo during a main ;
* form startup.;
;
* It has single property named uFileName that specifies the ;
* name of the image file to be shown during main form startup.;
;
* It has a method named uShow to show the specified image.;
;
* It has a method named uClose to end display of the image.;
;
* ==========================================================;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM FORMPOSITION(ScreenCenter) FORMSTYLE(StayOnTop) FRAMESTYLE(ToolWindow) HEIGHT(280) LAYOUTMANAGER(#ATLM_2) LEFT(505) TITLEBARVISIBLE(False) TOP(127) VISUALSTYLE(#VS_PANEL) WIDTH(445);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_2);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#PANL_1) DISPLAYPOSITION(1) HEIGHT(253) LAYOUTMANAGER(#ATLM_3) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) WIDTH(437);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Center) MANAGE(#PANL_1) PARENT(#ATLM_2);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_3);
DEFINE_COM CLASS(#PRIM_IMGE) NAME(#LOGO) DISPLAYPOSITION(1) HEIGHT(247) LEFT(1) PARENT(#PANL_1) TABPOSITION(1) TOP(1) VISUALSTYLEOFPARENT(False) WIDTH(431);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_3) ATTACHMENT(Center) MANAGE(#LOGO) MARGINBOTTOM(1) MARGINLEFT(1) MARGINRIGHT(1) MARGINTOP(1) PARENT(#ATLM_3);
;
DEFINE_COM CLASS(#SYSVAR$AV) NAME(#PTYFILNAM);
Define_pty uFileName set(*Auto #PtyFilNam) ;
;
Define #ShtFilNam *Char Length(100);
;
* ==========================================================;
* Handle instance creation ;
* ==========================================================;
;
EvtRoutine Handling(#Com_Owner.CreateInstance);
;
Set #PtyFilNam Value('lansa2.bmp') ;
;
EndRoutine;
;
* ==========================================================;
* Show the logo ;
* ==========================================================;
;
MthRoutine uShow ;
;
Use TConcat (*Part_Dir_Source #PtyFilNam.Value) (#ShtFilNam);
Set #Logo filename(#ShtFilNam) ;
;
If '(#Logo.ImageHeight > 0) *and (#Logo.ImageWidth > 0)';
Set #Com_Owner Height(#Logo.ImageHeight) Width(#Logo.ImageWidth);
Endif;
;
Invoke #Com_Owner.ShowForm;
;
EndRoutine;
;
* ==========================================================;
* Close the logo;
* ==========================================================;
;
MthRoutine uClose;
;
Invoke #Com_Owner.CloseForm;
;
EndRoutine;
;
END_COM;