Click here to Skip to main content
15,887,812 members
Home / Discussions / C#
   

C#

 
GeneralRe: ADSI urgent help required Pin
Venkatraman2-Apr-03 21:28
Venkatraman2-Apr-03 21:28 
QuestionCWinThread equalant? Pin
bpavi2-Apr-03 10:38
bpavi2-Apr-03 10:38 
AnswerRe: CWinThread equalant? Pin
Oleksandr Kucherenko3-Apr-03 4:56
Oleksandr Kucherenko3-Apr-03 4:56 
GeneralRe: CWinThread equalant? Pin
Anonymous4-Apr-03 6:28
Anonymous4-Apr-03 6:28 
GeneralRe: CWinThread equalant? Pin
MikeKosak1-Mar-11 5:19
MikeKosak1-Mar-11 5:19 
GeneralActive Directory - Users or whatever Pin
Velichko Sarev2-Apr-03 9:32
Velichko Sarev2-Apr-03 9:32 
GeneralGDI+ flicker question Pin
Jon Newman2-Apr-03 9:27
Jon Newman2-Apr-03 9:27 
GeneralRe: GDI+ flicker question Pin
James T. Johnson2-Apr-03 9:41
James T. Johnson2-Apr-03 9:41 
As you code is right now there isn't much you can do to stop the flicker. But if you make the control smarter then you can eliminate most of it.

The causes of flicker are pretty basic: You take a picture, erase it, then draw over it again.

If you can skip the erase step or instead just draw over it, then you can eliminate the majority of flicker in an application. That is why the "use DoubleBuffer is said often" because you do both steps.

After looking at your source you have enabled the DoubleBuffer style bit but you missed the other two that need to be set with it, AllPaintingInWmPaint and UserPaint. That may do the trick for you, because the first one tells it to skip the drawing of the background and the second one tells the framework you are doing the drawing and not the OS.

If that doesn't do it, then you'll need to add some more intelligence to your repainting by calling Invalidate and passing in a rectangle or region which contains the area of the control that has changed. This will make the only part of the control to change be the part that was updated. As an optimization you can make the OnPaint handler paint only what it needs to by inspecting the ClipRectangle property of the PaintEventArgs.

James

"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation

GeneralRe: GDI+ flicker question Pin
Jon Newman2-Apr-03 9:49
Jon Newman2-Apr-03 9:49 
GeneralPressing DELETE button in DataGrid Pin
Mazdak2-Apr-03 7:45
Mazdak2-Apr-03 7:45 
GeneralRe: Pressing DELETE button in DataGrid Pin
Paul Riley2-Apr-03 7:50
Paul Riley2-Apr-03 7:50 
GeneralRe: Pressing DELETE button in DataGrid Pin
Mazdak2-Apr-03 7:53
Mazdak2-Apr-03 7:53 
GeneralRe: Pressing DELETE button in DataGrid Pin
Mazdak2-Apr-03 9:06
Mazdak2-Apr-03 9:06 
GeneralRe: Pressing DELETE button in DataGrid Pin
Mazdak2-Apr-03 9:34
Mazdak2-Apr-03 9:34 
QuestionC# Bitwise Operators? Pin
eidylon2-Apr-03 5:00
eidylon2-Apr-03 5:00 
AnswerRe: C# Bitwise Operators? Pin
James T. Johnson2-Apr-03 5:51
James T. Johnson2-Apr-03 5:51 
GeneralRe: C# Bitwise Operators? Pin
eidylon2-Apr-03 7:49
eidylon2-Apr-03 7:49 
GeneralRe: C# Bitwise Operators? Pin
James T. Johnson2-Apr-03 8:45
James T. Johnson2-Apr-03 8:45 
GeneralRe: C# Bitwise Operators? Pin
eidylon2-Apr-03 8:54
eidylon2-Apr-03 8:54 
GeneralRe: C# Bitwise Operators? Pin
James T. Johnson2-Apr-03 9:03
James T. Johnson2-Apr-03 9:03 
GeneralRe: C# Bitwise Operators? Pin
eidylon2-Apr-03 9:08
eidylon2-Apr-03 9:08 
GeneralRe: C# Bitwise Operators? Pin
Roger Alsing2-Apr-03 22:09
Roger Alsing2-Apr-03 22:09 
Generaljavascript not working in webbrowswer control Pin
monrobot132-Apr-03 4:22
monrobot132-Apr-03 4:22 
GeneralRe: javascript not working in webbrowswer control Pin
Stephane Rodriguez.2-Apr-03 19:40
Stephane Rodriguez.2-Apr-03 19:40 
GeneralRe: javascript not working in webbrowswer control Pin
monrobot133-Apr-03 3:12
monrobot133-Apr-03 3:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.