Jump to content
xisto Community

dolph

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Great code BUT i slightly changed it and i get the wrong password dude everytime and the pass.txt is so far only: test test So should be good enough i enclosed the code i used please help thanks Code : Private Sub Form_Load()Dim MyName As String ' This variable contains users full nameDim MyUName As String ' This variable contains users login name (username)Dim MyPass As String ' This variable contains users passwordDim Response As Integer ' This variable contains users answers from message boxesDim Saved_Name As String ' This variable contains saved username from fileDim Saved_Pass As String 'This variable contains saved password from fileOpen "pass.txt" For Input As #1 'we open file with data we needLine Input #1, Saved_Name ' We read username from fileLine Input #1, Saved_Pass 'We read password from fileClose #1 'we close the fileLogin_Name:MyName = InputBox("Skriv dit navn.", "Dit navn", "")If MyName = "" ThenResponse = MsgBox("Skriv dit navn eller det bliver værst for dig selv [img]http://forums.xisto.com/public/style_emoticons/default/laugh.gif; & vbCrLf & "Do You wish to proceed with the programm?", vbCritical + vbYesNo, "Error")If Response = vbYes Then GoTo Login_NameIf Response = vbNo Then MsgBox "Nå ikke!." & vbCrLf & "God dag til dig", vbInformation + vbOKOnly, "End" Form2.Visible = TrueEnd IfEnd IfLogin_UName:MyUName = InputBox("Login " & MojeIme & ", Skriv dit brugernavn.", "Login", "")If MyUName = "" ThenResponse = MsgBox("Skriv dit brugernavn er du dum?." & vbCrLf & "Vil du fortsætte?", vbCritical + vbYesNo, "Error")If Response = vbYes Then GoTo Login_UNameIf Response = vbNo Then MsgBox "Synd for dig." & vbCrLf & "God dag til dig", vbInformation + vbOKOnly, "End" Form2.Visible = TrueEnd IfEnd IfLogin_Pass:MyPass = InputBox("skriv password til brugernavn " & MyUName & ".", "Login", "")If MyPass = "" ThenResponse = MsgBox("Skriv dit password." & vbCrLf & "Vil du fortsætte?", vbCritical + vbYesNo, "Error")If Response = vbYes Then GoTo Login_PassIf Response = vbNo Then MsgBox "Synd for dig." & vbCrLf & "Hav en god dag", vbInformation + vbOKOnly, "End" Form2.Visible = TrueEnd IfEnd IfIf (Saved_Name = MyUName) And (Saved_Pass = MyPass) ThenEndElseMsgBox "Nope dude, brugernavn og/eller password er forkert", vbCritical + vbOKOnly, "Error"Form2.Visible = TrueEnd IfEnd Suband a form1 with a button and code :Private Sub Command1_Click()Form2.Visible = TrueEnd SubPrivate Sub Form_Load()App.TaskVisible = False (btw not full proff because the .exe name is still visible in processes not application any help on this too is appreciated or any coder can just close app from there :/)End Sub
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.