Home All Groups Group Topic Archive Search About

vb.net tabpage hiding painting

Author
21 Jan 2006 6:51 AM
marfi95
I am having to resort to Mick's methods when it comes to hiding/showing
tabpages of my tab control since .NET doesn't work correct.  I think I
have it finally workign the way I need, but because I can show/hide up
to 10 tabs, there is a lot of repainting/flickering going on and looks
really bad with everything flashing all over the place.  Is there a way
to turn off the painting until all the tab stuff is executed and then
do 1 refresh ?  Similar to the BeginUpdate for the listview ?

Thanks,
Mark

Author
21 Jan 2006 7:14 AM
Chris
marf***@yahoo.com wrote:
> I am having to resort to Mick's methods when it comes to hiding/showing
> tabpages of my tab control since .NET doesn't work correct.  I think I
> have it finally workign the way I need, but because I can show/hide up
> to 10 tabs, there is a lot of repainting/flickering going on and looks
> really bad with everything flashing all over the place.  Is there a way
> to turn off the painting until all the tab stuff is executed and then
> do 1 refresh ?  Similar to the BeginUpdate for the listview ?
>
> Thanks,
> Mark
>

Don't know about a beginupdate, but if you override the onpaint method
for the tab control and then only call the mybase.onpaint when you are
not doing your updating, that should have the same effect.

Chris
Author
21 Jan 2006 11:52 AM
Ken Tucker [MVP]
Hi,

        Calling the tabcontrols suspendlayout will prevent it from redrawing
until you call resumelayout.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclasssuspendlayouttopic.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwindowsformscontrolclassresumelayouttopic.asp

Ken
-------------
<marf***@yahoo.com> wrote in message
Show quoteHide quote
news:1137826295.436066.70330@g49g2000cwa.googlegroups.com...
>I am having to resort to Mick's methods when it comes to hiding/showing
> tabpages of my tab control since .NET doesn't work correct.  I think I
> have it finally workign the way I need, but because I can show/hide up
> to 10 tabs, there is a lot of repainting/flickering going on and looks
> really bad with everything flashing all over the place.  Is there a way
> to turn off the painting until all the tab stuff is executed and then
> do 1 refresh ?  Similar to the BeginUpdate for the listview ?
>
> Thanks,
> Mark
>
Author
22 Jan 2006 8:25 PM
marfi95
I tried this, but it didn't do anything different.  You can still see
all the tabs showing and hiding.

I don't think it matters, but I didn't mention this before in that the
only control I have on my tabpages is a UserControl (that contains all
the controls for the page)

Mark
Author
3 Feb 2006 10:58 AM
Kevin
Did you find a solution to this?  None of the above methods worked for
me.
Author
21 Jan 2006 12:34 PM
Herfried K. Wagner [MVP]
<marf***@yahoo.com> schrieb:
>I am having to resort to Mick's methods when it comes to hiding/showing
> tabpages of my tab control since .NET doesn't work correct.  I think I
> have it finally workign the way I need, but because I can show/hide up
> to 10 tabs, there is a lot of repainting/flickering going on and looks
> really bad with everything flashing all over the place.  Is there a way
> to turn off the painting until all the tab stuff is executed and then
> do 1 refresh ?

Preventing controls from redrawing
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=disableredrawing&lang=en>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>