Results 1 to 3 of 3

Thread: UserName and PassWord

  1. #1
    Guest

    Post

    Im trying to save both a password and a username into one file and im unable to say
    what is a password and whats a username(in the file)

  2. #2
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    Dave what is your exact question, and where do you get the username and password from.

  3. #3
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Post

    Try this: add two textboxes and a commandbutton to your form, and then paste this code:
    Code:
    Option Explicit
    
    Private Sub Command1_Click()
        Open "C:\windows\desktop\password.txt" For Output As #1
        Print #1, Text1.Text 'saves UserName
        Print #1, Text2.Text 'saves Password
        Close #1
    End Sub
    
    Private Sub Form_Load()
        Dim Password As String
        Dim UserName As String
        
        Open "C:\windows\desktop\password.txt" For Input As #1
            Line Input #1, UserName
            Line Input #1, Password
        Close #1
        Text1.Text = UserName
        Text2.Text = Password
    End Sub
    Hope this will help

    ------------------
    Visual Basic Programmer
    ------------------
    PolComSoft
    You will hear a lot about it.


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