Flickering with tab control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a tab control in my application, and any time I mouse over or off of a
tab, it flickers. It looks like it is redrawing it (albeit slowly) each time
one of these mouse events are raised.

I would like to eliminate this flicker, but I am not sure what might be
causing it. I noticed the HotTrack attribute in the tab control properties,
but turning it off did nothing. Infact, the tabs still visually changed with
it off (added a little orange bar on top on mouse over), but that is a
different issue I guess.

As I am really not sure where to start with this, any and all advice and
ideas are appreciated. Thanks!
 
This never happen to me. I would suggest you create a new winform and add
the tab in. If it still happen can it be your display card or other issues?

chanmm
 
I suspect that this is because your form has a Background Image. I'm not
sure that you're going to eliminate the flicker using a standard TabControl
and Visual Styles. You can disable Visual Styles for the TabControl by
making an Interop call to SetWindowTheme(), or you can Draw the TabControl
yourself to allow DoubleBuffering.

Drawing the control yourself is a lot of work, but gives you the option to
add features that are missing from the standard Control.

If you wish to keep Visual Styles and don't want all the work involved in
drawing the control, then you could use TabControlEX
(http://www.dotnetrix.co.uk/controls.html)

Alternatively, you could use Skybound VisualStyles
(www.skybound.ca/developer/visualstyles/default.aspx) to draw the control. I
don't know if this will fix the flicker problem without owner drawing, but
it will take out most of the work involved in drawing the control yourself.
 
You can also lookup the issue on google, a lot of people have written ways
to remove flicker from drawn controls.

"Mick Doherty"
 
i just had a thought as well. One workaround could be, if you do have a
background image, is to make a space in the background image where your
control is going to go. That way it will not have a background image behind
it which will hopefully solve the issue and you still have the same end
result.

"Mick Doherty"
 

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

Back
Top