Ah.!! I know it's rude to ask if you know how to open the .NET Framework. But hey, there's an easy way to open. Here are the steps:
1. Press Windows_Button + R to open the Run dialog box.
2. Type " devenv " and press enter.
After opening the .NET framework the point is how to connect to the windows application. The steps are as follows :
1. Click on File then on New then on Project.
2. Select " Visual C# "
3. In Templates select " Windows form application "
4. Name accordingly
5. Specify the location and press OK.
How to add a new Windows Form ( ie, form2 )
within the project :
1. Click
View and then click on Solution Explorer
2. Right
click on the project and click on Add and
then on windows form.
3. By
default Form2.cs name appears and
click on Add button.
How to set the windows state property of Form1
and Form2 as Maximised :
1. Right click on the form and click on Properties.
2. Select Windows State Property and set it to Maximised.
First Program [ Login Page ] :
1. One GroupBox control.
2. Two Label Controls.
3. Two TextBox Controls.
4. Three Button controls.
After doing the above, now arrange them in a systematic manner. Let's suppose :
Then set the Text properties as follows :
* groupBox1 as Login Page.
* Label 1 as Username.
* Label 2 as Password.
* Button1 as Login.
* Button2 as clear.
* Button3 as close.
Note:-
For better referencing and being an ethical programmer in .NET framework, set the Name property as follows:
* for Label controls start with lbl_( labelName )
* for TextBox controls start with txt_( TextBoxName )
* for Button controls start with btn_( labelName )
Here it's a small program so its easier to identify which button number belongs to which button name so it isn't an issue, but while programming a large Windows Application Form, it's difficult to identify.
So, here change in the following manner :-
For button controls :
Then, add another form namely form2 so as to display the next window after logging in and add a new label control.
So, the question is how to add another windows form to the same project.
The steps are as follows:
Note:-
For better referencing and being an ethical programmer in .NET framework, set the Name property as follows:
* for Label controls start with lbl_( labelName )
* for TextBox controls start with txt_( TextBoxName )
* for Button controls start with btn_( labelName )
Here it's a small program so its easier to identify which button number belongs to which button name so it isn't an issue, but while programming a large Windows Application Form, it's difficult to identify.
So, here change in the following manner :-
For button controls :
Control Name
|
Changed Name
Property
|
Changed Text
Property
|
button1
|
btn_login
|
Login
|
button2
|
btn_clear
|
Clear
|
button3
|
btn_close
|
close
|
For textBox controls :
Control Name
|
Changed Name
Property
|
textbox1
|
txt_uname
|
textbox2
|
txt_pwd
|
Then, add another form namely form2 so as to display the next window after logging in and add a new label control.
So, the question is how to add another windows form to the same project.
The steps are as follows:
- Open Solution Explorer
- Right click on the project
- Then click on Add and then on Windows Forms
- Type the required form name and click on Add.
Comments
Post a Comment