Loading Form in NET

Posted on 2003-03-22
Medium Priority
Last Modified: 2013-11-25
Hello, I'm a beginner at Visual Basic NET and I've come across a problem =(.

At my computer science class at high school, I asked my teacher about how to switch from Form1 to Form2 using a button on Form1.  Well he told me to put this code into the button on Form1:

Load Form2
Form2.Visible = True
Unload Form1

But you see at my high school we work on Visual Basic 6, I use NET.  This doesn't work on NET, so how would I do this on Visual Studio NET (Switch from Form1 to Form2)?
Question by:Naval
1 Comment
LVL 71

Accepted Solution

Éric Moreau earned 150 total points
ID: 8187618
you need to create an instance of your form:

dim x as new form2

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question