We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MDI Application looses focus when changing active child form

Thread ID:





42311 Mar 27,2006 06:34 AM UTC Apr 7,2006 02:15 AM UTC WinForms 9
Tags: Tools
Terry Rossow
Asked On March 27, 2006 06:34 AM UTC

Hi there, I have an MDI application that uses the Syncfusion XPMenu system, docking system, TreeViewAdv controls, and someothers. Whenever we change between active MDI children, or open a new MDI child, the application looses focus, and parts of whatever is behind show through, or it retains focus and parts of whatever is behind show through. Has anyone had a similar problem? Cheers, TERRY ROSSOW

Joy K George [Syncfusion]
Replied On March 27, 2006 03:27 PM UTC

Hi Terry, Please let me know, the version of Essential Studion and .net Framework you are using? Regards, Joy

Terry Rossow
Replied On March 28, 2006 12:40 AM UTC

I am using Syncfusion version and Visual Studio 2005.

Terry Rossow
Replied On March 28, 2006 12:40 AM UTC

And .NET 2.0

Joy K George [Syncfusion]
Replied On March 28, 2006 11:11 AM UTC

Hi Terry, Sorry for the inconvenience caused.I was not able to reproduce the issue here.But I have created a sample from your description and attached here.Please modify that to bring this issue and send to me.Or send any other sample which is having this problem. Thanks for using Syncfusion products. Regards Joy


Terence Rossow
Replied On April 5, 2006 11:30 PM UTC

Hi Joy, The issue appears to be caused by the use of the LockHostedFormForMdiChanges property of MainFrameBarManager. I was advised by another Syncfusion member that the use of this would solve an issue with the toolbars flickering on and off when the active mdi child changes - which it did. Unfortunately it also appears to have the side effect I have described in this thread. I have attached a sample that has the behaviour (although not as pronounced as in our real application - I expect this is simply because our app has a lot more code executing when a child changes). To produce the effect, open a web page or other application, and then run this sample over top of it in a maximised state. Then, double click a tree item rapidly a number of times to open many child windows - you should see parts of the application behind showing through (obviously an application with high contrast to the sample app is best). If you manage to click on the application behind as it shows through, the sample app will loose focus and the one behind will gain it. Thanks, TERRY ROSSOW


Joy K George [Syncfusion]
Replied On April 6, 2006 03:21 PM UTC

Hi Terry Rossow, I am looking into your issue. I will update you later. Regards Joy

Administrator [Syncfusion]
Replied On April 6, 2006 04:02 PM UTC

Hi Terry, Since v4.1.0.50 we have changed our techniques for reducing flickering in the XPMenus package. If you download v4.1.0.62 (available at http://www.syncfusion.com/latestversion.aspx), you should be able to turn back off that property and everything should be handled correctly. However, if you have a DockingManager on your form, it may require slightly more code. If that''s the case, let me know and I''ll provide you with the necessary code. Regards, Gregory Austin Syncfusion Inc.

Terence Rossow
Replied On April 6, 2006 11:18 PM UTC

Hi Gregory, We do have a DockingManager in our application. Could I please have the code you mentioned? Thanks, TERRY ROSSOW

Administrator [Syncfusion]
Replied On April 7, 2006 02:15 AM UTC

Hi Terry, Part of the flicker is caused by the DockingManager resizing during the merging process. To prevent this, you''ll need to call DockingManager.SuspendLayout() and then DockingManager.ResumeLayout() after all the merging is complete. The first place to include these calls is wrapped around any code that initializes an MDI window. The second place is in an OnMdiChildActivate override, with code resembling below: public override void OnMdiChildActivate(EventArgs e) { this.dockingManager1.SuspendLayout(); base.OnMdiChildActivate(e); this.dockingManager1.ResumeLayout(); } You might need to make some minor tweaks to the above code, since I don''t have the exact code in front of me. On a related note, you might want to try out the ForwardMenuShortcuts property on DockingManager. We added it recently and setting it to true will allow you to use menu shortcuts from a floating docking window. However, this does change the behavior of the DockingManager in other subtle ways, so you should test it out first. Regards, Gregory Austin Syncfusion Inc.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon