In this post i am going to explain a simple login application in windows c# . In this App we will cover few concepts like login concept with database connection, working with multiple forms in windows c# ,  passing values from one form to another form , adding local database to our windows c# project.
For this i am designing two forms one is for Login and another is for displaying Welcome Message for logged in user.
The screenshots of application shown below .
CSharp winforms login app_1
C# winforms login application

We are designing the two forms as shown above . and we are designing a table LoginDetails in LoginDB , which is a Local Database added to our application .

Table : LoginDetails

C#.Net login application table

Sql query to create table :

CREATE TABLE LOGINDETAILS( NAME VARCHAR(25),PASSWORD NVARCHAR(25))

Now the C# code of Form1 is like this

and the c# code of Form2 is like this

Download Source Code

Leave a Reply

Your email address will not be published. Required fields are marked *