Showing results 1 to 6 of 6

Thread: C# - write stringvalue to a Picture Element (Screen Type: Login, Element: Current user)

  1. #1
    Join Date
    11.10.2007
    Posts
    7

    Default C# - write stringvalue to a Picture Element (Screen Type: Login, Element: Current user)

    Hello everybody,

    I have tried to assign a stringvalue to the control element "current user".

    It apears not to be possible to reach the value thrue the object modell, there is no object which discribes the value like the object "text" of the element "static text".

    do you have some ideas how to write different string values (in this case different user names) to the element "current user" on the screen "logon".

    greets

    ilia

  2. #2
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default AW: C# - write stringvalue to a Picture Element (Screen Type: Login, Element: Current user)

    "Current user" is based on the system driver. Most of the system driver variables are read only.

  3. #3
    Join Date
    11.10.2007
    Posts
    7

    Default Re: C# - write stringvalue to a Picture Element (Screen Type: Login, Element: Current user)

    but is there a way to write a "value" to the element?! like we do it with the keyboard?!

  4. #4
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default AW: C# - write stringvalue to a Picture Element (Screen Type: Login, Element: Current user)

    the MDI-element "current user" is always read only - it displayed (as the name implies) the current logged-in user.

    the MDI-element "user name" is the field where you enter the zenon user (together with the password in the MDI-element Password)
    -> for these both elements an external writing possiblity does not exist

    if you want to login a user directly via VBA you may look into the help documenation (Manual -> Programming interfaces -> Object model -> Passwords -> Login)

  5. #5
    Join Date
    11.10.2007
    Posts
    7

    Default Re: C# - write stringvalue to a Picture Element (Screen Type: Login, Element: Current user)

    thank you for the tipp,

    but also in case of using this methods it would be the same like the function "login without password".

    In my case it is nessesary to identificate the user by asking a password.

    the problem is, that the usernames are not comon and contain several letters and numbers --> complicated.

    Therefore I'm looking for a possibility to define some static usernames to be able just to "select" each user name and not to type in (difficult for user because of touch PC). Afterwards it is necessary to identificate user by password.

    do you have some ideas?!

  6. #6
    Join Date
    30.05.2007
    Location
    Salzburg
    Posts
    879

    Default AW: C# - write stringvalue to a Picture Element (Screen Type: Login, Element: Current user)

    - take a zenon combo-/listbox and define the user names there (internal string variable)
    - take a "dynamic text" element where you set the password (internal string variable)
    -> to encrypt the password in the element take a password font (available in the internet)

    via the method "LoginPassword" you then can login the password

    Sub LoginUser()
    Dim bResult As Boolean
    bResult = zUserAdministration.LoginPassword("LogonName", "P@ssword")
    End Sub


    -> where "LogonName" is the value of the string variable of the zenon combo-/listbox
    -> where "P@ssword" is the value of the string variable of the "dynamic text" element

    With zenon 7 it is also possible to fill the zenon combo-/listbox dynamically
    -> therefore you would loop through all users definied in the project and then put them together into a string variable (check out help documentation how to do)

Similar Threads

  1. Replies: 8
    Last Post: 18th March 2015, 11:30
  2. Login with custom keyboard screen
    By batabaha in forum zenon Supervisor
    Replies: 1
    Last Post: 15th April 2012, 23:33
  3. Nested Structured Data Type in Combi Element
    By ansab.tp in forum zenon Supervisor
    Replies: 2
    Last Post: 21st March 2012, 07:38
  4. Element.Type
    By sniggi in forum VBA
    Replies: 2
    Last Post: 17th March 2012, 11:31
  5. Replies: 5
    Last Post: 3rd August 2011, 17:24

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •