Hello all. I am working with windows forms in c++/cli. I am trying to use a tabpage control. When i have a background image behind my tabs, the tabs will flicker when i click on them. I have read about using this in my forms main constructor.

this->DoubleBuffered = true;
 

this->SetStyle(ControlStyles::AllPaintingInWmPaint |
 

ControlStyles::UserPaint |
 

ControlStyles::OptimizedDoubleBuffer, true);
 

this->UpdateStyles();

The code i wrote above does not work.
I have also read about making a new class with the tabcontrol and an extended class,then overloading its functions somehow. But i don't know, any help please this is making my whole project look bad. thanks again, for any advice.

Double buffering your form will not help you out with your tabcontrol.
Can you give more detail, are the background images on the tabpages?
some code will help.
Milton

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.