Code to Dock A maintenance form
What is the necessary code to dock and undock a maintenance form and where is a form being shown should the code go to make it be docked when shown?
I have the following code in a form shown event
And this works fine when the form is shown but without the following code in a SetupBeforeHandlers, the form jumps as soon as you click in a JiwaGrid and the ribbon disappears up under the title bar of the mdi frame.
I have the following code in a form shown event
- Code: Select all
this.MdiParent = null;
this.WindowState = FormWindowState.Maximized;
this.WindowState = FormWindowState.Normal;
this.MdiParent = Manager.MDIParentForm;
And this works fine when the form is shown but without the following code in a SetupBeforeHandlers, the form jumps as soon as you click in a JiwaGrid and the ribbon disappears up under the title bar of the mdi frame.
- Code: Select all
public override void SetupBeforeHandlers()
{
base.SetupBeforeHandlers();
this.MdiParent = Manager.MDIParentForm;
}