Thursday, 24 April 2014

Windows Application close current window open another window.Another windows close event trigger shows parent window

  First Window code for button click
          SecondWindow rfisreport = new SecondWindow();
            rfisreport.Parent = this;
            this.Hide();
            rfisreport.Show();

Second Window Code

 public FirstWindow Parent;

 protected override void OnClosed(EventArgs e)
        {
            base.OnClosed(e);
            if(Parent!=null)              
            {
                Parent.Show();
            }
        }

No comments:

Post a Comment