I have created the standard login form from VBs sample thing with the code:
VB Code:
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long Public OK As Boolean Private Sub Form_Load() Dim sBuffer As String Dim lSize As Long sBuffer = Space$(255) lSize = Len(sBuffer) Call GetUserName(sBuffer, lSize) If lSize > 0 Then txtUserName.Text = Left$(sBuffer, lSize) Else txtUserName.Text = vbNullString End If End Sub Private Sub cmdCancel_Click() OK = False Me.Hide End Sub Private Sub cmdOK_Click() 'ToDo: create test for correct password 'check for correct password If txtPassword.Text = "" Then OK = True Me.Hide Else MsgBox "Invalid Password, try again!", , "Login" txtPassword.SetFocus txtPassword.SelStart = 0 txtPassword.SelLength = Len(txtPassword.Text) End If End Sub
How would i get the users and passwords in there? :ehh:
And I would like it so that they can edit their passwords and create new users etc.
