0

I have a form that is created by default. That has been designed to the way I want it to, now I want to create a new form dynamically, but I want to set the new form to look exactly like the one created by default. Programming in VB.NET (WinForms) and Environment VS2010.

I have so far:

Dim newWindow As new Form

newWindow = Me

newWindow.Show()

I know there should be something like newWindow inherits Form1 but can't figure out where to put it =S

Thanks in advance.

1
  • What is the Form's name of the Form you created. Commented Aug 16, 2012 at 2:57

1 Answer 1

3

You are currently creating a Form, then assigning your current Form to it. You need to New up another instance of your Form then you can show it, along with your Main Form.

Dim newWindow As New Form1 'Name of my Default Form's Class assuming Form1.
newWindow.Show() 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.