Results 1 to 2 of 2

Thread: A quick 'login' question

  1. #1

    Thread Starter
    Hyperactive Member ..:RUDI:..'s Avatar
    Join Date
    Aug 2005
    Location
    Yorkshire, England! c0d: Da Vinci
    Posts
    344

    A quick 'login' question

    I have created the standard login form from VBs sample thing with the code:

    VB Code:
    1. Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long
    2.  
    3.  
    4. Public OK As Boolean
    5. Private Sub Form_Load()
    6.     Dim sBuffer As String
    7.     Dim lSize As Long
    8.  
    9.  
    10.     sBuffer = Space$(255)
    11.     lSize = Len(sBuffer)
    12.     Call GetUserName(sBuffer, lSize)
    13.     If lSize > 0 Then
    14.         txtUserName.Text = Left$(sBuffer, lSize)
    15.     Else
    16.         txtUserName.Text = vbNullString
    17.     End If
    18. End Sub
    19.  
    20.  
    21.  
    22. Private Sub cmdCancel_Click()
    23.     OK = False
    24.     Me.Hide
    25. End Sub
    26.  
    27.  
    28. Private Sub cmdOK_Click()
    29.     'ToDo: create test for correct password
    30.     'check for correct password
    31.     If txtPassword.Text = "" Then
    32.         OK = True
    33.         Me.Hide
    34.     Else
    35.         MsgBox "Invalid Password, try again!", , "Login"
    36.         txtPassword.SetFocus
    37.         txtPassword.SelStart = 0
    38.         txtPassword.SelLength = Len(txtPassword.Text)
    39.     End If
    40. End Sub

    How would i get the users and passwords in there?

    And I would like it so that they can edit their passwords and create new users etc.



    My Personal Home | MageBB Home | Elders Online
    Yes, Noteme is my father.

  2. #2

    Thread Starter
    Hyperactive Member ..:RUDI:..'s Avatar
    Join Date
    Aug 2005
    Location
    Yorkshire, England! c0d: Da Vinci
    Posts
    344

    Re: A quick 'login' question

    Sorry, wrong forum, please delete this thread



    My Personal Home | MageBB Home | Elders Online
    Yes, Noteme is my father.

Posting Permissions

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



Click Here to Expand Forum to Full Width