Click here to Skip to main content
15,907,492 members
Home / Discussions / C#
   

C#

 
QuestionContext Menu Pin
Programm3r29-Nov-07 0:15
Programm3r29-Nov-07 0:15 
AnswerRe: Context Menu Pin
Colin Angus Mackay29-Nov-07 0:22
Colin Angus Mackay29-Nov-07 0:22 
QuestionRe: Context Menu Pin
Programm3r29-Nov-07 0:26
Programm3r29-Nov-07 0:26 
AnswerRe: Context Menu Pin
Programm3r29-Nov-07 0:33
Programm3r29-Nov-07 0:33 
QuestionRegistering ActiveX Components on Windows Server 2003 Pin
Mike.Lewis.TIS28-Nov-07 23:33
Mike.Lewis.TIS28-Nov-07 23:33 
QuestionGet RAID Status ? Pin
m4ko28-Nov-07 23:29
m4ko28-Nov-07 23:29 
AnswerRe: Get RAID Status ? Pin
leppie29-Nov-07 1:55
leppie29-Nov-07 1:55 
QuestionDouble buffering ineffective Pin
Lauulauu28-Nov-07 23:25
Lauulauu28-Nov-07 23:25 
Hi all,

Continuing the development of my 2D game for school, I encountered a new problem that is killing me.

When I draw 1 sprite on top of the other, the one on top starts flickering. I googled for a while and found that doublebuffering would solve the problem. However, setting the styles:

SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true);


does not work, neither does DoubleBuffered = true, and at one point I wrote a simpel double buffering mechanism myself, which also did not solve the problem. My program works as follows:

In the constructor, a Graphics object is created using CreateGraphics(). Then, as soon as a Timer fires the Tick event, sprite positions are updated, and the Draw() method is called of the sprite, passing in the Graphics object created in the constructor. I did not override OnPaint.

Any idea's on how to fix this?

Thanks!
AnswerRe: Double buffering ineffective Pin
Luc Pattyn28-Nov-07 23:38
sitebuilderLuc Pattyn28-Nov-07 23:38 
AnswerRe: Double buffering ineffective Pin
Russell Jones29-Nov-07 1:01
Russell Jones29-Nov-07 1:01 
AnswerRe: Double buffering ineffective Pin
Ennis Ray Lynch, Jr.29-Nov-07 4:19
Ennis Ray Lynch, Jr.29-Nov-07 4:19 
QuestionC# Crystal Report Export Pin
The Geek28-Nov-07 23:04
The Geek28-Nov-07 23:04 
QuestionAnother UI Issue (ToolStrip) Pin
Jeffrey Walton28-Nov-07 22:38
Jeffrey Walton28-Nov-07 22:38 
AnswerRe: Another UI Issue (ToolStrip) Pin
Pankaj - Joshi28-Nov-07 22:47
Pankaj - Joshi28-Nov-07 22:47 
QuestionA Question about Threading with Socket-Class Pin
MarkPhB28-Nov-07 22:15
MarkPhB28-Nov-07 22:15 
AnswerRe: A Question about Threading with Socket-Class [modified] Pin
m@u28-Nov-07 22:48
m@u28-Nov-07 22:48 
QuestionClass library assembly permissions, best practice Pin
harleydk28-Nov-07 22:11
harleydk28-Nov-07 22:11 
Questionhow to add new row to an exiting data table...? Pin
Pankaj - Joshi28-Nov-07 21:26
Pankaj - Joshi28-Nov-07 21:26 
AnswerRe: how to add new row to an exiting data table...? Pin
Thaer Hamael28-Nov-07 21:33
Thaer Hamael28-Nov-07 21:33 
GeneralRe: how to add new row to an exiting data table...? Pin
Pankaj - Joshi28-Nov-07 22:09
Pankaj - Joshi28-Nov-07 22:09 
GeneralRe: how to add new row to an exiting data table...? Pin
Pankaj - Joshi28-Nov-07 22:12
Pankaj - Joshi28-Nov-07 22:12 
GeneralRe: how to add new row to an exiting data table...? Pin
Mr. Candyman28-Nov-07 23:03
Mr. Candyman28-Nov-07 23:03 
Jokesorry, duplicated message :-P Pin
Mr. Candyman28-Nov-07 23:05
Mr. Candyman28-Nov-07 23:05 
QuestionActive Control Pin
Thaer Hamael28-Nov-07 21:22
Thaer Hamael28-Nov-07 21:22 
QuestionDataGridView Pin
baerten28-Nov-07 21:19
baerten28-Nov-07 21:19 

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.