MDI Child Form ?


G

Guest

I am trying to open another MDI Child form (that is not currently open) from
within another MDI Child. There is a "Next" button that should navigate to
the next form in the series, and I cannot get this to work. With VB6, it
would have been simple, but vb.NET is completely different.

Basically, I have a function on the MDI Parent that should open the new
child, that I am calling from the child currently open. This code executes
without error but then NOTHING happens.... It goes like this:

Public Sub ShowChildForm()

Dim MDIChild As New frmROS

MDIChild.MdiParent = Me
MDIChild.Show()
MDIChild.Dock = DockStyle.Fill

End Sub

Any ideas what I may be doing wrong?
Thanks,
-Valerie
 
Ad

Advertisements

K

Ken Tucker [MVP]

Hi,

I think you are not calling the right ShowChildForm procedure. In
the code for the next button on the child form try something like this.

DirectCast(me.mdiparent,Form1).ShowChildForm

' replace form1with the name of your mdi parent form.


Ken
---------------------

I am trying to open another MDI Child form (that is not currently open) from
within another MDI Child. There is a "Next" button that should navigate to
the next form in the series, and I cannot get this to work. With VB6, it
would have been simple, but vb.NET is completely different.

Basically, I have a function on the MDI Parent that should open the new
child, that I am calling from the child currently open. This code executes
without error but then NOTHING happens.... It goes like this:

Public Sub ShowChildForm()

Dim MDIChild As New frmROS

MDIChild.MdiParent = Me
MDIChild.Show()
MDIChild.Dock = DockStyle.Fill

End Sub

Any ideas what I may be doing wrong?
Thanks,
-Valerie
 
G

Guest

Ken,
Thanks for the response, but I know that the procedure is executing because
I am stepping through the code... any other ideas?

Thanks,
-Valerie
 
Ad

Advertisements

K

Ken Tucker [MVP]

Hi,

Please post the code that calls the procedure.

Ken
-------------
Ken,
Thanks for the response, but I know that the procedure is executing because
I am stepping through the code... any other ideas?

Thanks,
-Valerie
 

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