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. Image for the cookie policy date
close icon

MDI Application looses focus when changing active child form

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

9 Replies

JK Joy K George Syncfusion Team 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


TR Terry Rossow March 28, 2006 12:40 AM UTC

I am using Syncfusion version 4.1.0.50 and Visual Studio 2005.


TR Terry Rossow March 28, 2006 12:40 AM UTC

And .NET 2.0


JK Joy K George Syncfusion Team 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

fr42311_sample.zip


TR Terence Rossow 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

fr42311_sample0.zip


JK Joy K George Syncfusion Team April 6, 2006 03:21 PM UTC

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


AD Administrator Syncfusion Team 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.


TR Terence Rossow 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


AD Administrator Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon