Home All Groups Group Topic Archive Search About
Author
1 Apr 2005 6:45 PM
kvrdev1
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

Author
2 Apr 2005 12:39 AM
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
---------------------

"kvrdev1" <kvrd***@discussions.microsoft.com> wrote in message
news:2F1AB9F8-9275-4CC0-8339-3DF52FC011EB@microsoft.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
Author
2 Apr 2005 2:19 PM
kvrdev1
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

Show quoteHide quote
"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" <kvrd***@discussions.microsoft.com> wrote in message
> news:2F1AB9F8-9275-4CC0-8339-3DF52FC011EB@microsoft.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
>
>
>
Author
3 Apr 2005 1:12 AM
Ken Tucker [MVP]
Hi,

      Please post the code that calls the procedure.

Ken
-------------
"kvrdev1" <kvrd***@discussions.microsoft.com> wrote in message
news:58D37224-1926-4C65-9DDF-1F57C3313F19@microsoft.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

Show quoteHide quote
"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" <kvrd***@discussions.microsoft.com> wrote in message
> news:2F1AB9F8-9275-4CC0-8339-3DF52FC011EB@microsoft.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
>
>
>