Dave Byron
13 Jul 05, 10:16 AM
He is a bit of code to show the user on a color touch screen.
dave
Variables
{Enter Variable definitions here}
lastuser : integer;
Procedures
Functions
{ Get the user level }
function WhoamI : integer;
begin
whoami := getaccesslevel;
end;
Initialisation
{Enter Initialisation code here}
{ Set to 99 so will start the first time }
lastuser := 99;
Module "UserText"
{ See if user changed ? }
if whoami <> lastuser then
begin
{ Set font size and position on screen }
setfontsize (11);
setfontstyle(0);textpos(500,460);
{ Which user }
Case whoami of
0: drawtext('Anyone');
1: drawtext('Guest');
2: drawtext('Cleaner');
3: drawtext('Owner');
4: drawtext('Supervisor');
5: drawtext('Admin');
end;
{ Set lastuser to current user }
lastuser:= whoami;
end;
dave
Variables
{Enter Variable definitions here}
lastuser : integer;
Procedures
Functions
{ Get the user level }
function WhoamI : integer;
begin
whoami := getaccesslevel;
end;
Initialisation
{Enter Initialisation code here}
{ Set to 99 so will start the first time }
lastuser := 99;
Module "UserText"
{ See if user changed ? }
if whoami <> lastuser then
begin
{ Set font size and position on screen }
setfontsize (11);
setfontstyle(0);textpos(500,460);
{ Which user }
Case whoami of
0: drawtext('Anyone');
1: drawtext('Guest');
2: drawtext('Cleaner');
3: drawtext('Owner');
4: drawtext('Supervisor');
5: drawtext('Admin');
end;
{ Set lastuser to current user }
lastuser:= whoami;
end;