using Marquette in custom control
-
I've created a custom control that uses ControlStyle.BackBuffer ControlStyle.User etc... And i show a marquette when i move the mouse. the problem is if i use ControlStyle flags the control doesn't flicker but the it is impossible to see the marquette, if i doesn't use ControlStyle flags the marquette is showed correctly an it follow the mouse but the control flicks. Whow can i avoid the flickering drawing also the marquette?
-
I've created a custom control that uses ControlStyle.BackBuffer ControlStyle.User etc... And i show a marquette when i move the mouse. the problem is if i use ControlStyle flags the control doesn't flicker but the it is impossible to see the marquette, if i doesn't use ControlStyle flags the marquette is showed correctly an it follow the mouse but the control flicks. Whow can i avoid the flickering drawing also the marquette?
I assume you are using CreateGraphics to obtain a Grpahics object to draw your marquette to. You should in this case instead fill some field with the info on where to draw the marquette and call Invalidate to initiate a complete redraw of the control. Than in OnPaint you can also draw the marquette. If this is too slow because the painting function is very complex you will have to paint into a bitmap first and then draw this onto the control. While only the marquette is changing you could always just draw the bitmap + marquette.