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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 70

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

771 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