Parent Form to call child form

G

Guest

How do I open a child form in my parent form. I enter the child form name
but there is no show method in the intelli-sense.
 
M

Mike Labosh

How do I open a child form in my parent form. I enter the child form name
but there is no show method in the intelli-sense.

In VB 6, you would do this:

frmChild.Show

But in VB.NET, you have to create an instance of your child form first:

Dim f As New frmChild()
f.Show()

If you want to show your child form modally:

Dim f As New frmChild()
f.ShowDialog()
--
Peace & happy computing,

Mike Labosh, MCSD

"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this new system SUCKS."
-- General Barringer, "War Games"
 
H

Herfried K. Wagner [MVP]

Mike L said:
How do I open a child form in my parent form. I enter the child form name
but there is no show method in the intelli-sense.

\\\
Dim f As New FooForm()
f.Show()
///

In VB 2005:

\\\
My.Forms.FooForm.Show()
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top