Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET General > Login Screen Help!!!

Thread Tools Display Modes
Old 03-30-2012, 10:52 AM
Boss123 Boss123 is offline
Join Date: Mar 2012
Posts: 4
Post Login Screen Help!!!


How can I code a login screen that only allows authorised users access to the programme?

Also I have a Database which will be connected to the login screen so that the users (Username and Password) are stored in the database and the input text boxes will compare with the database records and login successfully.

Reply With Quote
Old 03-30-2012, 11:27 AM
AtmaWeapon's Avatar
AtmaWeapon AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500

There are an unenumerable amount of examples of answers to this question on this forum and others. The particulars of how each step is implemented are different for every application, but in the end it boils down to this:

Make a login form. Either make that your startup form, or have your main form display it modally. When the user clicks whatever button is the "OK" button, execute something like this:
If (AreCredentialsValid(username, password)) Then
It's up to you to implement the individual steps there. The only snag is, depending on how "CloseThisForm()" is implemented, you might have to change your project settings to close the program when the last form is closed, not the startup form.
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..