p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   VB.NET 2002/2003 Basics (http://p2p.wrox.com/forumdisplay.php?f=76)
-   -   MDI Screen Flicker when childforms swapped (http://p2p.wrox.com/showthread.php?t=22005)

Nick.Net December 2nd, 2004 03:12 AM

MDI Screen Flicker when childforms swapped
 
I have a harmless but quite ugly problem with a MDI application.

As I open multiple childforms into my MDI application, they are added as menuitems to my mainmenu control on the parent form. I can then select (bring to front) any of the childforms by using this menu system (as you can under the 'window' menu system in many applications). If the child forms are maximised when I do this, the forms 'flicker' on the screen as the selected form is brought to the front (the minimised version of the childform can just be made out during this flicker).

Does anyone know what causes this, or how to fix it?


kohinek June 10th, 2007 08:34 PM

easy solution :), but took me a lot of toime to find it and try all possible ways :)

private void OnToolStripItemClicked(object sender, EventArgs e)
{
    ToolStripButton clickedButton = (ToolStripButton)sender;

    ((Form)clickedButton.Tag).Visible = false;

    ((Form)clickedButton.Tag).Activate();

    ((Form)clickedButton.Tag).Visible = true;
}

((Form)clickedButton.Tag) is a MDIChild Form ....



All times are GMT -4. The time now is 05:29 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.