Things You'll Need:
- VB.net
-
Step 1
Open VB.net and create a new VB.net windows application. This also works very similar in C# as well.
-
Step 2
Add ButtonOnce you have your new VB.net windows application project in front of you, add a button to the form. In this button we are going to put the code so we can create the object of the form and display it. Where you place the button is irrelevant. So put it where ever you want.
-
Step 3
TextboxNow add a textbox to the form. The textbox is being used as a control to display on the instance of the object so you can see how you can make changes. You can used any control you want, I chose a textbox.
-
Step 4
Visible PropertyBring up the properties window of the textbox. This click be done by clicking the textbox and pressing the F4 key on your keyboard. Find the "visible" property and set it to "false". We do not want to show this control when we initially run our program.
-
Step 5
Click eventDouble click on the button to bring up the button's click event.
-
Step 6
CodeIn the click event we declare a variable as a new instance of our form object. Then using our object variable we set the textbox property to true so it will display and the button's visible property to false so we do not see it. See the associated picture with this step for the code. Ehow does not allow code inside the steps.
-
Step 7
Run the program by pressing the F5 key on your keyboard.
-
Step 8
Final ResultsWhen you initial form is displayed, click the button to run the underlying code. You will see another form pop up with the button gone and text textbox displayed. Your results should look similar to the associated picture with this step.











