5 Years
Discussion Span
Last Post by Paul_24

till now i dont do much vb.net but i am familiar to vb6 , so on the basis of vb6 i am giving you a answer

i dont understand why you are making login form without database connection, but if you really dont wanna use it , then try it:-

If Text1.Text = "user name" And Text2.Text = "user password" Then
MsgBox "login successful"
MsgBox "incorrect detail"
End If

hope this helps you ...


VB.net has a login form template that you can use. Just Add -> New Item to your project and choose Login Form


In my opinion, coding a password into the program itself is asking for trouble. If I were you, I would save the password into an external text file first. Then, when the form loads, check to see if that file exists, read the text from it and then run a check to confirm that the user given password matches that in the saved file. For added security, you could create a form that runs on first use to ask the user for a password, then save the password into a user defined location with some simple encryption.

Hope this helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.