Results 1 to 1 of 1

Thread: Logging into a Windows Forms Application

  1. #1

    Thread Starter
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Attached Files Attached Files
    Last edited by jmcilhinney; Feb 16th, 2008 at 08:17 PM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width