Jeffrey,
I spent some more time on this and the more time I spend the more confused I
get.
First, i'm not sure what this statement means:
" I have contacted our product team. As their feedback, this behavior should
by design, because in Win32 code, the MDI Child also can not have a mdi
child without maximize and minimize box. "
In the app the MDI child doesn't have a child. Only the parent MDI has
children.
Also, using the app us have I still get strange results. I've set the tabs
so that the text box is 0, switch button is 1 and ext buttone is 2. Start the
program and press Enter, Nothing happens (which is good) so I click Switch.
Repeat on the next form. Also works corrently. Now first form is displayed
again with value 2 in the text box. You can type in the box so we know the
focus is in the text box. Press Enter and it swiches forms. What! Why did the
button2_click fire? Repeat on next form. Text box has red background. Same
thing happens. If you continue doing this you find that the form doesn't
switch when the text background is white but always switches when it is red
or blue. IT SHOULD NEVER SWITCH SINCE THERE IS NO ACCEPT BUTTON AND THE
FOCUS IS IN THE TEXT BOX FIELD. If in the real app, I set the
FormBorderStyle to None I get even stranger results. Sometimes no child is
displayed and I end up with an empty MDI form. If the FormBorderStyle is
Sizable then the app works correctly. Also, in the real app there seems to be
no need to set me.top = 0 and me.left = 0 but in the test it is needed.
Oh, I've also added two labels on the screen that show the width and height
of the form and a message box in the switch box that is displayed if the
current width/height is not the same as in the two labels. The label text is
set in the Activated Sub. Why does the height change.?
here is the code:
Activated Sub
Label1.Text = "Width = " & Me.Width
Label2.Text = "Height = " & Me.Height
button2 click
Dim w As String = "Width = " & Me.Width
Dim h As String = "Height = " & Me.Height
If w <> Label1.Text Or h <> Label2.Text Then
MessageBox.Show("Width/Height now " & w & ", " & h)
End If
I can't see how any of these actions can be "by design". They are not even
consistant from form to form and click to click.
George
"Jeffrey Tan[MSFT]" said:
Hi molly,
Sorry for letting you wait for so long.
Yes, it seems that this is also not a suitable workaround for this issue.
I have contacted our product team. As their feedback, this behavior should
by design, because in Win32 code, the MDI Child also can not have a mdi
child without maximize and minimize box.
Currently, we can not find a perfect solution or workaround for this issue,
and my original workaround of using non-caption bar form and Dock.Fill
style should be the only avaible one, althrough with some flicker issue.
Also, as we tested, if we swith between these 2 forms, the Form3 will not
position well on the MDI client window, and 2 scrollbars will appear on the
client area. I think we should re-position the Form3 to the correct
position to fix this issue. Like this:
Public Sub MyShow()
Me.Show()
Me.Left = 0
Me.Top = 0
End Sub
I will attached the modified project in this reply. For your information.
===========================================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights