Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Have bitmap move across form without blinking

$
0
0

I have

            Paint += new PaintEventHandler(this.Display);

and

        public void Display(object sender, PaintEventArgs e)
        {
            Point characterposition = new Point(x, y);
            e.Graphics.DrawImage(character, characterposition);
        }

I want the character (who will be stored in the character variable) as x and y change. I have been using

            this.Invalidate();
but It makes the bitmap blink as it moves. How can I fix this? Thanks, Jake

Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>