Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
215 views

Introduction To C# Windows Forms Applications

This document provides instructions for creating a Windows Forms application using Visual Studio 2017. It explains that Windows Forms allows developing desktop applications with graphical user interfaces for Windows. It then outlines the steps to create a new Windows Forms project in Visual Studio, add controls via the toolbox, set control properties, and run the application.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
215 views

Introduction To C# Windows Forms Applications

This document provides instructions for creating a Windows Forms application using Visual Studio 2017. It explains that Windows Forms allows developing desktop applications with graphical user interfaces for Windows. It then outlines the steps to create a new Windows Forms project in Visual Studio, add controls via the toolbox, set control properties, and run the application.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction to C# Windows Forms Applications

Windows Forms is a Graphical User Interface(GUI) class library which is bundled in .Net Framework.
Its main purpose is to provide an easier interface to develop the applications for desktop, tablet, PCs.
It is also termed as the WinForms. The applications which are developed by using Windows Forms
or WinForms are known as the Windows Forms Applications that runs on the desktop computer.
WinForms can be used only to develop the Windows Forms Applications not web applications.
WinForms applications can contain the different type of controls like labels, list boxes, tooltip etc.

Creating a Windows Forms Application Using Visual Studio 2017

 First, open the Visual Studio then Go to File -> New -> Project to create a new project and
then select the language as Visual C# from the left menu. Click on Windows Forms App(.NET
Framework) in the middle of current window. After that give the project name and Click OK.
 After that following window will display which will be divided into three parts as follows:
1. Editor Window or Main Window: Here, you will work with forms and code editing. You can
notice the layout of form which is now blank. You will double click the form then it will open the
code for that.
2. Solution Explorer Window: It is used to navigate between all items in solution. For example,
if you will select a file form this window then particular information will be display in the
property window.
3. Properties Window: This window is used to change the different properties of the selected
item in the Solution Explorer. Also, you can change the properties of components or controls
that you will add to the forms.
 Now to add the controls to your WinForms application go to Toolbox tab present in the
extreme left side of Visual Studio. Here, you can see a list of controls. To access the most
commonly used controls go to Common Controlspresent in Toolbox tab.

 Now drag and drop the controls that you needed on created Form. For example, if you can add
TextBox, ListBox, Button etc. as shown below. By clicking on the particular dropped control you
can see and change its properties present in the right most corner of Visual Studio.

In the above image, you can see the TextBox is selected and its properties like TextAlign,
MaxLength etc. are opened in right most corner. You can change its properties’ values as per
the application need. The code of controls will be automatically added in the background. You
can check the Form1.Designer.cs file present in the Solution Explorer Window.

 To run the program you can use an F5 key or Play button present in the toolbar of Visual
Studio. To stop the program you can use pause button present in the ToolBar. You can also run
the program by going to Debug->Start Debuggingmenu in the menubar.

You might also like