The Student Room Group

COMP4 Project - Login Screen - VB.net

Heya guys.
Really stuck on this as im bad when it comes to the programming part of computing.
Im using VB.net and want to create a login screen on a windows form app using SQL or access to save the users/passwords, as I want to encryt the passwords so you cant just look at the code and find the passwords.
Does anyone have any code of a program that they have made with a login screen, or link me to somewhere where it explains how to do it.
Cheers.
Reply 1
Original post by Stevee.R
Heya guys.
Really stuck on this as im bad when it comes to the programming part of computing.
Im using VB.net and want to create a login screen on a windows form app using SQL or access to save the users/passwords, as I want to encryt the passwords so you cant just look at the code and find the passwords.
Does anyone have any code of a program that they have made with a login screen, or link me to somewhere where it explains how to do it.
Cheers.

I don't have any code for you, but you could use something like an Access database to store account information.

In the database store a password hash, rather than the actual password, so people cannot just look in the database and see the passwords.
For instance, if my password was to be "fallen", you would store a hash of "fallen" rather than "fallen" itself.
A hash commonly used for this purpose is MD5. It can be implemented easily in VB.NET.
You will have to make your own MD5() function in your code, but you can paste it from Google as there is no way they could expect you to do it any other way).
Note that someone would be able to insert their own account into the Access database by opening it in Access, and gain entry to your program, but at least they would not be able to find other users' passwords.

As for the login form, just have textboxes for Username and Password, and then a Login and Cancel button. Those are the basics.
Check if an account exists with that Username and Password Hash, and open the main form or whatever if it exists.

Quick Reply

Latest

Trending

Trending