FIX: RightToLeft Menu is not drawn properly when the Form.WindowState is Maximized
The information in this article applies to:
- Visual Studio .NET 2002
- Visual Studio .NET 2003
SYMPTOMS
When you develop a windows form and set the Form.WindowState = Maximized while Form.RightToLeft =Yes and there is a MainMenu. The MainMenu appears incorrectly.
At runtime, the MainMenu appears on the left side until the user refreshes the form.
FIX
Programmatically, you can fix this bug by refreshing the menu layout. On the Form_load you can call OnRightToLeftChange to refresh the view, as follows:
C# code:
private void Form1_Load(object sender, System.EventArgs e)
{
this(EventArgs.Empty);
|
VB code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles MyBase.Load
Me.OnRightToLeftChanged(EventArgs.Empty)
|

|