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:
and here's happens in transitioning process:
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
Post a Comment