My main program is a Multiple Document Interface (MDI). I create and show 2 or more child forms inside the MDI parent. If I left click on the child forms, the focus and Z-index will change correctly. (E.G. I have form1 and form2 as the child forms,
form1 is active. I left click anywhere on form2 and the focus and z-index changes). This works correctly.
However, if I right click on the non-active form the focus and z-index does not change. In my program I have context menus for the forms; these context menus appear correctly, but again, the focus and z-index does not change.
I created a simple test program: a MDI parent form with the containing area and a button to create new forms. The new button does:
childForm = newForm();
With this, the same issue arises. I can switch focus and z-index by left clicking between the child forms but I cannot switch by right clicking. I also checked the MDIChildActivate event. This event is fired when I left click, but not when
I right click.
I checked Excel (2003) and right clicking does change the focus and z-index. So my assumption is that it is a bug. My hope is that I can find a workaround that doesn't involve adding code to everyone of my child forms.
Thanks in advance for your help.