VB .Net WIN Forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter

    VB .Net WIN Forms

    Hi Everyone,

    I need your help with VB .Net forms.

    I have an MDI Parent form and several MDI Children in my VB .Net App.

    I have noticed that when I close the MDI Parent the closing event of the MDI
    Children does not fire.

    Tow (2) Questions:

    1. Is there a way to force the closing event of the MDI Children to fire
    when the MDI parent is closing.

    2. Is it possible to stop the MDI Parent from closing using the Closing
    event of one of the MDI Children.
  • Cor Ligthert

    #2
    Re: VB .Net WIN Forms

    Peter,

    You can use in the MDI parent the MDIchildren collection.



    Your second question, is more difficult to answer, because the closing of a
    MDI child should not close a MDI parent. So that needs in my opinion more
    explanation although preventing closing is done in the closing event from a
    form and than set the e.cancel to (and in that I make forever mistakes so
    try it) I thought it was True.

    As a question, you say that you want help with VBNet Forms,

    Any reason why you do not ask this in the newsgroup?
    microsoft.publi c.dotnet.langua ges.vb

    I hope however that the answer above helps you, and when you need to know
    how to use it, be free to ask it here or in that VBNet newsgroup?

    Cor

    "Peter" <Peter@discussi ons.microsoft.c om>
    [color=blue]
    > Hi Everyone,
    >
    > I need your help with VB .Net forms.
    >
    > I have an MDI Parent form and several MDI Children in my VB .Net App.
    >
    > I have noticed that when I close the MDI Parent the closing event of the
    > MDI
    > Children does not fire.
    >
    > Tow (2) Questions:
    >
    > 1. Is there a way to force the closing event of the MDI Children to fire
    > when the MDI parent is closing.
    >
    > 2. Is it possible to stop the MDI Parent from closing using the Closing
    > event of one of the MDI Children.[/color]


    Comment

    • Ken Williams

      #3
      RE: VB .Net WIN Forms

      Thanks Cor.

      "Peter" wrote:
      [color=blue]
      > Hi Everyone,
      >
      > I need your help with VB .Net forms.
      >
      > I have an MDI Parent form and several MDI Children in my VB .Net App.
      >
      > I have noticed that when I close the MDI Parent the closing event of the MDI
      > Children does not fire.
      >
      > Tow (2) Questions:
      >
      > 1. Is there a way to force the closing event of the MDI Children to fire
      > when the MDI parent is closing.
      >
      > 2. Is it possible to stop the MDI Parent from closing using the Closing
      > event of one of the MDI Children.[/color]

      Comment

      Working...