Code to Dock A maintenance form  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Code to Dock A maintenance form

Postby SBarnes » Sun Dec 10, 2017 5:05 pm

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

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;

      }
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Code to Dock A maintenance form  Topic is solved

Postby Mike.Sheen » Mon Dec 11, 2017 9:17 am

SBarnes wrote: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

Code: Select all
         this.MdiParent = null;
         this.WindowState = FormWindowState.Maximized;
         this.WindowState = FormWindowState.Normal;
         this.MdiParent = Manager.MDIParentForm;



You don't need that code in the shown handler - you just need what you already have below in the overridden SetupBeforeHandlers method:

SBarnes wrote:
Code: Select all
      public override void SetupBeforeHandlers()
      {

         base.SetupBeforeHandlers();
         this.MdiParent = Manager.MDIParentForm;

      }
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Code to Dock A maintenance form

Postby SBarnes » Mon Dec 11, 2017 9:35 am

Hi Mike

Thanks, for the quick reply.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 31 guests

cron