Making A Progam You Log Into
Heres The VidI Made
Code:
http://www.youtube.com/watch?v=v-ORxz030mA
Heres The Tutorial Written
What You Need Is
2 Buttons
2 Text Boxes
2 Labels
2 Forms
Ok Heres Wat You Need To Do
TextBox1 = User Name
TextBox2 = PassWord
Button1 = Login
Button2 = Close
Oh And If You Dont Know How To Add A New Form Right Click Your main Project Not "My Project" But The Thing above And Go To Add Then Select Add Windows Form and dont change the text when it asks if you want
Now The Coding
For Button1 aka Login Button Put This
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "Your UserName" And TextBox2.Text = "Your Pass" Then
MsgBox("Welcome To Locked Program")
Form2.Show()
Me.Hide()
Else
MsgBox("Wrong UserName or Password")
End If
End Sub
For Button2 aka Close Put
End
Re: Making A Progam You Log Into
Cool, I guess. It's sad that VB uses just one equals sign for a comparison. Microshit should really make it 2 so its users won't get confused when they switch to real languages like Obj-C or C++ (hell, or even java, but I'm going to exclude javascript because it has that shitty === thing)
Re: Making A Progam You Log Into
no offence but even for visual basic this is a shit way to make a login system... why not use mysql databasing or even a offline databasing :P
Re: Making A Progam You Log Into
Quote:
Originally Posted by
DeToX
no offence but even for visual basic this is a shit way to make a login system... why not use mysql databasing or even a offline databasing :P
can VB even connect to a mysql server? I know with Objective-c if you want to use sql you HAVE to write it in C
Re: Making A Progam You Log Into
yup with the SQL DLL you can connect add and delete and edit items etc in a database
Re: Making A Progam You Log Into
Quote:
Originally Posted by
DeToX
yup with the SQL DLL you can connect add and delete and edit items etc in a database
That's pretty cool, I guess. But if you ever want to do login stuff, always encrypt!!!