What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » VB Help [Another problem]

VB Help [Another problem]
Author: Message:
Reaper
Veteran Member
*****

Avatar

Posts: 1393
Reputation: 23
36 / Male / Flag
Joined: Jun 2004
O.P. RE: VB Help
i just wanna test it with the one login info, so i dont need to do the loop and split do i?

what i got in the file is:

guest|qwerty

nothing else

btw if u want the code i have got, it is:
code:
Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
    'set the global var to false
    'to denote a failed login
    LoginSucceeded = False
    Me.Hide
End Sub

Private Sub cmdOK_Click()
    'check for correct password
    If txtPassword = "password" Then
        'place code to here to pass the
        'success to the calling sub
        'setting a global var is the easiest
        LoginSucceeded = True
        frmMainMenu.Show
        Me.Hide
            Else
        MsgBox "Invalid Password, try again!", , "Login"
        txtPassword.SetFocus
        SendKeys "{Home}+{End}"
    End If
End Sub

Private Sub Form_Load()
Dim strUsername, strPassword As String

Open "C:\Documents and Settings\Kevish\My Documents\A2 Computing Coursework\login.txt" For Input As #1
Do Until EOF(1)
     Input #1, strUsername, strPassword
     If strUsername = txtUserName And strPassword = txtPassword Then
          'Do stuff if password and username match
          Exit Do
     End If
Loop
Close #1
End Sub


This post was edited on 09-13-2005 at 10:33 PM by Reaper.
09-13-2005 10:29 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
VB Help [Another problem] - by Reaper on 09-13-2005 at 06:01 PM
RE: VB Help - by matty on 09-13-2005 at 06:48 PM
RE: RE: VB Help - by CookieRevised on 09-14-2005 at 06:33 AM
RE: VB Help - by Reaper on 09-13-2005 at 06:52 PM
RE: VB Help - by RaceProUK on 09-13-2005 at 09:14 PM
RE: VB Help - by Reaper on 09-13-2005 at 10:00 PM
RE: VB Help - by brian on 09-13-2005 at 10:25 PM
RE: VB Help - by Reaper on 09-13-2005 at 10:29 PM
RE: VB Help - by matty on 09-13-2005 at 11:08 PM
RE: VB Help - by Reaper on 09-14-2005 at 02:58 PM
RE: VB Help [Another problem] - by Reaper on 09-15-2005 at 05:17 PM
RE: VB Help [Another problem] - by RaceProUK on 09-15-2005 at 08:25 PM
RE: VB Help [Another problem] - by Reaper on 09-15-2005 at 09:17 PM
RE: RE: VB Help [Another problem] - by CookieRevised on 09-16-2005 at 06:55 AM
RE: VB Help [Another problem] - by Reaper on 09-16-2005 at 01:50 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On