Problems transitioning between panels (C# WinForms) -


i'm writing "multi-screened" application in c#. "screens" represent different areas of program i.e. settings, restricted access, administration, etc.

the problem i'm having when i'm transitioning between 1 panel , another. during transition process, whole form momentarily glitches , outlines of of controls can seen. text on panels appears block background of other panel , other weird things occur.

here's screenshots of i'm trying explain...

here's panel i'm transitioning should like:

enter image description here

and here's happens in transitioning process:

enter image description here

i have function use transition between panels. code follows:

delegate void dtranspanel(object pan1, object pan2);     private void transpanel(object hide, object show)     {         if (invokerequired) invoke(new dtranspanel(transpanel), new object[] { hide, show });         else         {             panel h = (panel)hide;             panel s = (panel)show;             h.hide();             application.doevents();             s.show();         }     } 

i'm complete novice when comes graphics , such-like. there better method using function above :p

my apologies if there similar question haven't found (i did search around) or if i've made noobiest mistake on planet...

you try using:

panel h = (panel)hide; panel s = (panel)show; h.hide(); s.suspendlayout(); s.show(); s.resumelayout(); 

this should mean won't see


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -