Show User on Touch

Discussion in 'Pascal Logic Code Examples' started by Dave Byron, Jul 13, 2005.

  1. Dave Byron

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    He is a bit of code to show the user on a color touch screen.
    dave


    Code:
    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 Byron, Jul 13, 2005
    #1
  2. Dave Byron

    [IL]NewGen

    Joined:
    Aug 3, 2004
    Messages:
    121
    Likes Received:
    0
    Location:
    Melb, Australia
    does this display on screen via simualtion mode ? :eek:
     
    [IL]NewGen, Jul 20, 2005
    #2
  3. Dave Byron

    Dave Byron

    Joined:
    Aug 3, 2004
    Messages:
    835
    Likes Received:
    0
    Location:
    Casurina
    sure does - need so i can tell who the user is logged in as this effects what they can do on the touch.

    dave
     
    Dave Byron, Jul 20, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.