Using C # and Visual Studio 2015 to make additional form.

Today I will tell you about how to use additional form into C# source code without using Form Design.
First, you need to open under Visual Studio 2015 a new project Windows Form Application.
This project will come with a windows form.
Press Ctr+Alt+X keys and will see the Toolbox with all Windows controls.
Add one button to your window form with double left click.
Use double left click to your button and will see the source code of your form.
The C# script will be Form1.cs and for your button will have this:

If you want to open a new form with your button then you need to add source code:

This source code will make a new form named fInfo with this text: Info and about !.
Into this form will have a label named myText with this text: This software is created by the website: free-tutorials.org!.
The form fInfo add the label myText and finally show this form.
The source code comes with size, height, weight, and location to show the form and label to design form.
The StartPosition is used to put the form into the center of your screen.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.