closing previous form

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

    #1

    closing previous form

    Hi
    I am opening a new form by:
    ChooseLeve chl = new ChooseLevel();
    chl.owner = this;
    chl.close;

    i want that when the user clicks on button1 in chl (ChooseLevel), the
    preiouse form will be closed,
    how do i do it?

  • Randy A. Ynchausti

    #2
    Re: closing previous form

    ss,
    [color=blue]
    > I am opening a new form by:
    > ChooseLeve chl = new ChooseLevel();
    > chl.owner = this;
    > chl.close;
    >
    > i want that when the user clicks on button1 in chl (ChooseLevel), the
    > preiouse form will be closed,
    > how do i do it?[/color]

    Depending on what you really want to do, the simplest way may be to pass a
    reference to the form that should be closed in the ChooseLevel constructor
    and close it in the Closing() event handler of chl. There are other ways
    that may be more convenient depending on your exact requirements.

    Regards,

    Randy


    Comment

    Working...