views:

153

answers:

1

My program shows some browser. From a browser user can open maximized MDI form with some report. When user is closing the report, first MDI form with browser is became maximized.

2 forms have same MDI parent. Can I change this behavior to leave my first browser form without maximizing after second report closed?

A: 

When you maximize an MDI form, you are essentially maximizing the parent form that contains the MDI form. One way to handle this is to check to see if the browser will be active when you close the report form, and if so, set the MDIParent's windowstate to normal when you close the report MDI child.

xpda
MDIParent's windowstate property doesn't helps me, but this code is working fine. Thank you. Private Sub ReportPreviewForm_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing Me.WindowState = FormWindowState.Normal End Sub
Vadim