By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,694 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,694 IT Pros & Developers. It's quick & easy.

MDI Child Form ?

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
---------------------

"kvrdev1" <kv*****@discussions.microsoft.com> wrote in message
news:2F**********************************@microsof t.com...
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
Nov 21 '05 #2

P: n/a
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

"Ken Tucker [MVP]" wrote:
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
---------------------

"kvrdev1" <kv*****@discussions.microsoft.com> wrote in message
news:2F**********************************@microsof t.com...
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

Nov 21 '05 #3

P: n/a
Hi,

Please post the code that calls the procedure.

Ken
-------------
"kvrdev1" <kv*****@discussions.microsoft.com> wrote in message
news:58**********************************@microsof t.com...
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

"Ken Tucker [MVP]" wrote:
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
---------------------

"kvrdev1" <kv*****@discussions.microsoft.com> wrote in message
news:2F**********************************@microsof t.com...
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

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.