0

My basic issue lies in that the images I am drawing will 'flicker', often. My program flow works exactly as I wish apart from this, and is as follows:

  • Uses G.Clear, to Clear all previous screen instances.

  • Draws entities/shapes.

  • Performs functions for positions of next entities, and Restarts the flow.

(This essentially shows a pendulum in motion, which unfortunately flickers strongly.)

I believe the issue lies purely in G.Clear causing the choppiness.

I apologize if this isn't concise enough, and thanks in advance to anyone who can help me out here.

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
Brittany
  • 93
  • 1
  • 8

1 Answers1

0

Try switching doublebuffering on.

Peter W.
  • 2,323
  • 4
  • 22
  • 42
  • Thank you for the response, Peter. May I ask exactly how to do that? – Brittany Apr 22 '12 at 21:06
  • Open up the constructor of the form and start typing "SetStyle", IntelliSense should show you what to do. You can combine multiple arguments for the first parameter with Or, the last parameter should be True if you want to switch doublebuffering on. – Peter W. Apr 22 '12 at 21:08
  • Thanks, I tried using: SetStyle(ControlStyles.OptimizedDoubleBuffer, True) , which I placed in the Form1 Load Sub, but unfortunately it doesn't seem to have changed the flickering – Brittany Apr 22 '12 at 21:18
  • AFAIK you have to do that in the constructor or else it won't work. – Peter W. Apr 22 '12 at 21:42