TechSupportNepTechSupportNep - Programming & Tech

  • Home
  • C#.NET
  • PHP
  • JAVA
  • Python
  • ASP.NET
  • VB.NET
  • Android
  • C
  • Tech
    • Tech News
  • Patreoner
TechSupportNep
  • Home
  • Programming
  • C#.NET
  • Create Simple Login Form in C#.NET Without Connecting to Database [With Source Code]
C#.NET

Create Simple Login Form in C#.NET Without Connecting to Database [With Source Code]

By Er. Ran Bahadur B.K. Last updated Aug 15, 2021
0 7,503
Share

If you guyz are beginners in C#.NET, and you want to learn simple window form application with some controls like Textbox, Button, Label etc. change their properties and dragging and dropping these controls in your form, Then you are in the right tutorials.

First of all you need to have Visual Studio in your System, if you don’t have, Download it from here: Click Here

STEPS:

1. After installing this IDE, Open it and go to file from the menu of this IDE, Click new>new project, From the left side of your window, select Visual C#>Window and from the middle side select Windows Forms Application and then give the name of your project and then click ok which is shown in below.

2. From the ToolBox Drag and Drop two label, two Textbox and one button in your form and change the properties of these controls by selecting each control and right click that particular control and click on properties.

3. You need to change the label Text to username and password, TextBox Name to txtuser, txtpass or something like that so that it’s easy to remember during programming otherwise you may confused which textbox is associated with which label and change the Button name to btnlogin and Text to login.

4.  Double click on the button and write the following piece of code:

string user, pass;
user = txtUser.Text;
pass = txtPass.Text;
if(user=="admin"&& pass=="admin")
{
MessageBox.Show("successful");
}
else
{
MessageBox.Show("error");
}

5. That’s it. This method of creating login window in C#.NET is called static method.

if you want to create login window which is connected with your database then see these tutorials:

Login window using SQL Server Database: click here

Login window using MySQL Database:click here

 

If you are confused then you can watch the following video:

 

Continue Reading
c#c# desktop application examplesc# formc# form applicationc# form designc# login formc# windows application examples codesc# windows form applicationc# windows formsc# windows forms controlsc# winformslogin form in c sharpransimple login form in c# without databasesimple login form in c#.netsimple login from in c#system windows formswindows form application c#windows form visual studiowindows formswindows forms c#winforms login form
0 7,503
Share FacebookTwitterReddItWhatsAppPinterestEmail
Er. Ran Bahadur B.K.60 posts 56 comments

Ran Bahadur B.K. is the owner of TechSupportNep who is working with the aim of providing the quality Technology content. He is creating Tech and Programming videos, you can see all them in his YouTube Channel(https://www.youtube.com/TechSupportNep). He is also working with some company.

Prev Post

How to Send Free SMS using Android?[With Source Code]

Next Post

How to Create Simple Login Form in Android Studio Without using Database?

You might also like More from author
C#.NET

How to Create Quiz Application in C#.NET using SQL Server Database and Visual Studio?…

C#.NET

How to Create Login Window in C# using SQL Server Database in Visual Studio?

Leave a comment
Help Needed

This website is free of annoying ads. We want to keep it like this. You can help with your support:

Donate!

The need for Support! Why to Support?

If you need your own website? contact me!
erranbahadurbk
Fiverr
Seller
Hello there,This is me Ran Bahadur B.K., A graduated computer engineer. I have 3+ years of work experience in wordpress design and development. I have strong knowledge of HTML, CSS and PHP which are the three ingredients of web development. Currently i am working with the software company so i also have experience in desktop apps and mobile apps development.

Latest

Python

How to Create Login Application in Python using SQLite Database?

How to use View Binding in Android?

Windows 10 Build 1909 Features that you should know.

How to Create a Complete Login and Forgot Password System in java ?

Prev Next 1 of 15
  • About us
  • Contact us
  • Privacy Policy
  • Disclaimer
© 2022 All Rights Reserved.
Website By: Ran Bahadur B.K.