This is posted in another thread also, but you can copy the following into page code of a new page to get started. You will also want to set page privileges to prevent logged off users from accessing areas of your application:
[
Title = "/PMfLJ/DR";
Color = "<FF409FFF>";
Result = "";
Username = "";
Password = "";
PageX;
PageY;
PageHeight = 768;
PageWidth = 1024;
PageMinWidth;
PageMinHeight;
PageVWidth;
PageVHeight;
InputWidth = 150;
InputHeight = 20;
ButtonWidth = 150;
ButtonHeight = 25;
SecBit = 17;
]
Main [
Return(Self);
\System.Edit(PageWidth/2-InputWidth/2, PageHeight/4 { Top left corner - fixed },
PageWidth/2+InputWidth/2, PageHeight/4+InputHeight { Bottom right corner },
"Username" { Title },
Username { Var to update }
{ Remainder of parameters not used, so omitted });
\System.Edit(PageWidth/2-InputWidth/2, PageHeight/4+InputHeight+50 { Top left corner - fixed },
PageWidth/2+InputWidth/2, PageHeight/4+2*50+2*InputHeight { Bottom right corner },
"Password" { Title },
Password { Var to update },
invalid, invalid, invalid, invalid, invalid, invalid, invalid, invalid, invalid {Optional arguments not set},
0b000000010000 {Style set to mask input}
{ Remainder of parameters not used, so omitted });
If Winbutton(PageWidth/2-ButtonWidth/2, PageHeight/4+3*50+2*InputHeight, PageWidth/2+ButtonWidth/2, PageHeight/4+2*50+2*InputHeight+ButtonHeight, 0, "Login", 1, \_DialogFont);
[
Result = \SecurityManager.QuietLogon(Concat(Username,":",Password));
Username = "";
Password = "";
IfThen(Result == 1,
Execute(Result=0,
\DisplayManager\ShowPage("Overview", 0))
);
]
{Background Fade}
GUITransform(0, 768, 1024, 41,
1, 1, 1, 1, 1 { Scaling },
0, 0 { Movement },
1, 0 { Visibility, Reserved },
0, 0, 0 { Selectability },
Scope(\Code, "Library", TRUE)\Bitmap(\ImageParmSet("Bitmaps\Lighting Overlays\Transparent\LowerRightToUpperLeftFade.png", "<FFFF40FF>", 0, 0, Invalid, 0.5, 1.4, 1, 0, 1, 0, 0), Invalid, 0, 1, 1, 0.5, 1, 0, 0, 0, 0, 0, "<FFFFFFFF>", 0, 0));
]
This is posted in another thread also, but you can copy the following into page code of a new page to get started. You will also want to set page privileges to prevent logged off users from accessing areas of your application:
````
[
Title = "/PMfLJ/DR";
Color = "<FF409FFF>";
Result = "";
Username = "";
Password = "";
PageX;
PageY;
PageHeight = 768;
PageWidth = 1024;
PageMinWidth;
PageMinHeight;
PageVWidth;
PageVHeight;
InputWidth = 150;
InputHeight = 20;
ButtonWidth = 150;
ButtonHeight = 25;
SecBit = 17;
]
Main [
Return(Self);
\System.Edit(PageWidth/2-InputWidth/2, PageHeight/4 { Top left corner - fixed },
PageWidth/2+InputWidth/2, PageHeight/4+InputHeight { Bottom right corner },
"Username" { Title },
Username { Var to update }
{ Remainder of parameters not used, so omitted });
\System.Edit(PageWidth/2-InputWidth/2, PageHeight/4+InputHeight+50 { Top left corner - fixed },
PageWidth/2+InputWidth/2, PageHeight/4+2*50+2*InputHeight { Bottom right corner },
"Password" { Title },
Password { Var to update },
invalid, invalid, invalid, invalid, invalid, invalid, invalid, invalid, invalid {Optional arguments not set},
0b000000010000 {Style set to mask input}
{ Remainder of parameters not used, so omitted });
If Winbutton(PageWidth/2-ButtonWidth/2, PageHeight/4+3*50+2*InputHeight, PageWidth/2+ButtonWidth/2, PageHeight/4+2*50+2*InputHeight+ButtonHeight, 0, "Login", 1, \_DialogFont);
[
Result = \SecurityManager.QuietLogon(Concat(Username,":",Password));
Username = "";
Password = "";
IfThen(Result == 1,
Execute(Result=0,
\DisplayManager\ShowPage("Overview", 0))
);
]
{Background Fade}
GUITransform(0, 768, 1024, 41,
1, 1, 1, 1, 1 { Scaling },
0, 0 { Movement },
1, 0 { Visibility, Reserved },
0, 0, 0 { Selectability },
Scope(\Code, "Library", TRUE)\Bitmap(\ImageParmSet("Bitmaps\Lighting Overlays\Transparent\LowerRightToUpperLeftFade.png", "<FFFF40FF>", 0, 0, Invalid, 0.5, 1.4, 1, 0, 1, 0, 0), Invalid, 0, 1, 1, 0.5, 1, 0, 0, 0, 0, 0, "<FFFFFFFF>", 0, 0));
]
````
Trihedral Engineering Ltd.