A Windows application is a standalone application that runs on desktop computers and has a collection of controls such as buttons, labels, text boxes, checkboxes, grids, radio buttons, and more.
Below example, I will show how to create a windows application and add controls to the form and create a database and tables.
Open Visual Studio > File > New > Click Project.
In New Project dialog, Select Visual C# templates > Choose .Net Framwork > Select "Windown Forms App (.Net Framework)"
Once the application created successfully, We will start adding controls from the Toolbox section as shown below and provide proper naming for controls.
Next, We will create a database and table in SQL Server. Open "Microsoft SQL Server Management Studio" > Right Click "Database" folder > Click "New Database".
The below "New Database" dialog, provide a new database name as "dbEmployeeDetails" and click OK.
Run below new table creation query in SQL window to create a new
CREATE TABLE [dbo].[Emp_details]( [EmpId] [int] NOT NULL, [EmpName] [nvarchar](50) NULL, [EmpAge] [int] NULL, [EmpContact] [int] NULL, [EmpGender] [nchar](10) NULL )
You can also verify table columns by Right Click newly created table and click "Design". The table looks like below in SQL studio,
Next article, We will see how to create a database connection from windows application to database and CRUD Operation (Create, Retrieve, Update, and Delete).