|
|
#1 |
|
.NUT
Join Date: May 05
Location: Sydney, Australia
Posts: 61,542
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Logging into a Windows Forms Application
Something like this may have been posted before but I created this demo to answer a question recently so I decided to post it here. This demo displays a login dialogue before creating the main window. If the user either cancels the login or else provides invalid credentials three times the app will exit without ever creating a main window at all. If the login is successful within three attempts then login dialogue is dismissed and the main window is displayed.
Make sure you check out the Program.cs file, which is where the Main method is located. It's there that the decisions are made. Note that the attached solution was created in VS 2005. It should upgrade fine to VS 2008, although I haven't tested that.
__________________
![]() 2007-2010 Why is my data not saved to my database? | Communicating between multiple forms | MSDN Data Walkthroughs MSDN "How Do I?" Videos: VB | C# VBForums Database Development FAQ My CodeBank Submissions: VB (Nullable Data Extensions *NEW*) (Serial Code TextBox *NEW*) | C# (ForumAccount has translated some of my VB submissions to C#) My Blog: Defining and Raising Custom Events | Using Parameters in ADO.NET | Keyboard Events *NEW* Last edited by jmcilhinney; Feb 16th, 2008 at 07:17 PM. |
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|