0

I'm using Visual Studio 2010 with Devexpress 15.1 Demo version. I'm developing my graduate project. When I maximize any XtraForm, other XtraForms are also affecting and all of them has been maximized. Further if I make WindowState to Normal, all of them goes to Normal State. I have a XtraForm called BaseForm, and I create a new Form by inheriting BaseForm. Forms are not interdependent.

1- I set into the BaseForm Load Event - WindowState = FormWindowState.Normal; Failure.

2- I set into the Inherited Forms - WindowState = FormWindowState.Normal; Failure.

Any ideas?

Sebi
  • 3,879
  • 2
  • 35
  • 62
Burak H.
  • 1
  • 1
  • Do you have some sample code? – Hexxed Jan 26 '17 at 06:40
  • Thansk for reply. I dont use any state code into the BaseForm or others. I calling the form as; XtraForm1 f = new XtraForm1(); f.MdiParent = this; f.Show(); – Burak H. Jan 26 '17 at 06:46
  • Please review this video https://youtu.be/zEQhj1ovq1M – Burak H. Jan 26 '17 at 06:54
  • probably XtraForm has its own `WindowState` Property. Like `XtraFrom.WindowState = FormWindowState.Normal` – Hexxed Jan 26 '17 at 07:03
  • Yes that true, its default value "Normal" but why do other forms get the same state value when I change the state value of a form? – Burak H. Jan 26 '17 at 07:06
  • @BurakH. Without any code it is small chance that we can help you. Post the code where you call your Childform and maybe the code of your BaseForm. – Sebi Jan 26 '17 at 07:09
  • I captured a new video including codes about this problem. Would you please watch it? https://youtu.be/0_j0GLQsvHQ Thank you all for interesting. – Burak H. Jan 26 '17 at 07:28
  • Could it be a bug of DevExpress? – Burak H. Jan 26 '17 at 07:32
  • From the looks of your code. You seem to be calling the same Form `f` then clicking it to maximize. Every form you opened named `f` will also behave similarly. Even if you instantiate in as `new` its still the same form. Try to make another form and open it using the `button2` – Hexxed Jan 26 '17 at 07:37
  • Unfortunately, it did not work. It gives same issue. – Burak H. Jan 26 '17 at 08:18

2 Answers2

0

Do not set

f.MdiParent = this;

on each form.

Paweł Swajdo
  • 391
  • 1
  • 13
0

This is standard Windows behavior. All Mdi child forms share the same WindowState. Minimizing one minimizes them all (and vice-versa).

Your options are to either not use an Mdi display or to use a tabbed Mdi display, in which case all forms will be maximized and displayed as tabs (similar to a web browser). Additionally, you could handle the Mdi child's FormClosing event and set its WindowState property to Normal, which would then reset all other child Mdi windows to a Normal WindowState.

Brendon
  • 1,238
  • 1
  • 7
  • 8