vb.net tabpage hiding painting

M

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
 
C

Chris

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
 
H

Herfried K. Wagner [MVP]

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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top