The Iceplug Method of Flickerless Display.

Now, as you may know, a Graphics object is the object that draws to a surface. It is not the surface that is drawn on. It does not even hold the drawings that it has already made. The Graphics object is like a tiny little invisible artist: you tell it to draw and it draws. You cannot examine the artist to determine what it has drawn.
So, with that in mind, let's look at Graphics drawing examples.
    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        e.Graphics.FillRectangle(Brushes.DarkGoldenrod, New Rectangle(0, 0, 100, 100))
    End Sub
        void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            e.Graphics.FillRectangle(Brushes.DarkGoldenrod , new Rectangle(0, 0, 100, 100));
        }
Now, that's lovely, it draws a persistent rectangle onto the form. However, if you are planning on moving something around on the form:
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        B += 10
        'B symbolizes the location of something moving on the form.
    End Sub

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        e.Graphics.FillRectangle(Brushes.DarkGoldenrod, New Rectangle(B, B, 100, 100))
    End Sub
        void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            e.Graphics.FillRectangle(Brushes.DarkGoldenrod , new Rectangle(b, b, 100, 100));
        }

        void Form1_Click(object sender, System.EventArgs e)
        {
            b += 10;
            //b symbolizes a location of something on the form.
        }
Now, clearly, this won't work too well, because Form1_Paint is not called everytime that the Form1_Click is called. The only way to see the changes is to either roll the form off the screen and back on again or move it under a window, causing it to raise the paint event. So, the next question would probably be how to raise the paint event? In fact, there are two ways to do this: Refresh and Invalidate. The invalidate subroutine of the form also takes a refresh rectangle... this would probably be useful if only you knew exactly what to invalidate. So, the simplest version is the Invalidate with no arguments. What's the difference between this and Refresh? Well, Invalidate will give you a faster result, since it is asynchronous.
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        B += 10
        'B symbolizes the location of something moving on the form.
        Me.Invalidate()
        'Calls Paint event and refreshes display.
    End Sub

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        e.Graphics.FillRectangle(Brushes.DarkGoldenrod, New Rectangle(B, B, 100, 100))
    End Sub
        void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            e.Graphics.FillRectangle(Brushes.DarkGoldenrod , new Rectangle(b, b, 100, 100));
        }

        void Form1_Click(object sender, System.EventArgs e)
        {
            b += 10;
            //b symbolizes a location of something on the form.
            this.Invalidate();
            //Calls the Paint event and refreshes the display.
        }
Now, what if you wanted a background? You might create one like this (by using .FillRectangle to fill the ClientRectangle on the form.
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        B += 10
        'B symbolizes the location of something moving on the form.
        Me.Invalidate()
        'Calls Paint event and refreshes display.
    End Sub

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        e.Graphics.FillRectangle(Brushes.Black, Me.ClientRectangle)  'Black background.
        e.Graphics.FillRectangle(Brushes.DarkGoldenrod, New Rectangle(B, B, 100, 100))
    End Sub
        void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            e.Graphics.FillRectangle(Brushes.Black, this.ClientRectangle);  //Black background.
            e.Graphics.FillRectangle(Brushes.DarkGoldenrod , new Rectangle(b, b, 100, 100));
        }

        void Form1_Click(object sender, System.EventArgs e)
        {
            b += 10;
            //b symbolizes a location of something on the form.
            this.Invalidate();
            //Calls the Paint event and refreshes the display.
        }
Now, try clicking a few times, and you just might get a flicker. So far, the road to nice drawing has been fairly productive, but this seems to be a deadend. This is where I branch off in search of a decent alternative.
In the big applications, double-buffering is typically used to keep this flicker from happening. Double-buffering is the act of drawing what you are going to display to a memory buffer/bitmap/device context/surface, and then, when you want to display something, the entire memory buffer is drawn in one fell swoop, in one graphics call, and no colors are redrawn, so no wasted pixel colorations on the display. Note that it is always faster to draw to a memory buffer instead of to the display.
The problem, however, is, "What are we going to use as a memory buffer?" A great candidate would be a Bitmap object, since it does allow you to draw it, by way of Graphics.DrawImage(). Further inspection of the Graphics object will show that there is a shared (static in C#) method called .FromImage(), which will create a Graphics object that draws to a Bitmap. So, this works out beautifully as a memory buffer, as long as the Bitmap isn't being drawn somewhere. And, of course, getting an empty bitmap is just as easy: the Bitmap class has a constructor that will create a black bitmap with specified width and height.
Setting up all of this is merely two lines of code though (for the black bitmap and the graphics object that draws to it).
    Dim Backup As System.Drawing.Bitmap  'Memory buffer - will be drawn in one fell swoop.
    Dim GFX As System.Drawing.Graphics   'Should draw to the memory buffer declared above.

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Backup = New Bitmap(200, 200)  '200x200 is the size of the memory bitmap, which will 
        'effectively be the size of the display, since nothing can go off of it.
        GFX = Graphics.FromImage(Backup)
    End Sub
        System.Drawing.Bitmap backup;  //Memory bitmap that will hold drawings that will be drawn all at once.
        System.Drawing.Graphics gfx;   //Draws the drawings to the memory bitmap above.

        private void Form1_Load(object sender, EventArgs e)
        {
            backup = new Bitmap(200, 200);
            //200x200 is the size of the memory bitmap, which is effectively going to be the display size.
            gfx = Graphics.FromImage(backup);
            //Set gfx to drawn to this backup bitmap.
        }
Now, instead of having to call the Paint event just to do our drawing, we can do them ourselves by using gfx to draw onto the backup bitmap.
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        B += 10
        'B symbolizes the location of something moving on the form.
        GFX.FillRectangle(Brushes.Black, Me.ClientRectangle)
        GFX.FillRectangle(Brushes.DarkGoldenrod, New Rectangle(B, B, 100, 100))
        'Draws to the backup bitmap.
    End Sub
        void Form1_Click(object sender, System.EventArgs e)
        {
            b += 10;
            //b symbolizes a location of something on the form.
            gfx.FillRectangle(Brushes.Black, this.ClientRectangle);  //Black background.
            gfx.FillRectangle(Brushes.DarkGoldenrod, new Rectangle(b, b, 100, 100));
        }
And next, we do actually need to draw this memory bitmap. So, we could draw it in the Paint event perhaps. But do we call .Invalidate() to draw the memory bitmap?
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        B += 10
        'B symbolizes the location of something moving on the form.
        GFX.FillRectangle(Brushes.Black, Me.ClientRectangle)
        GFX.FillRectangle(Brushes.DarkGoldenrod, New Rectangle(B, B, 100, 100))
        'Draws to the backup bitmap.
        Me.Invalidate()
    End Sub


    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        e.Graphics.DrawImage(Backup, 0, 0)
    End Sub
        void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            e.Graphics.DrawImage(backup, 0, 0);
           
        }

        void Form1_Click(object sender, System.EventArgs e)
        {
            b += 10;
            //b symbolizes a location of something on the form.
            gfx.FillRectangle(Brushes.Black, this.ClientRectangle);  //Black background.
            gfx.FillRectangle(Brushes.DarkGoldenrod, new Rectangle(b, b, 100, 100));
            this.Invalidate();
        }
This would just reintroduce the flicker that we've already wanted to get rid of. Because, .Invalidate will paint the form's color all over the form right before we recolor the background to be black, we get a flicker of form background color. So, we really don't want to even call .Invalidate(), since it will cause some excess color to be drawn onto the form. Now, if we could find a way to cause our display to be drawn to the form without having to .Invalidate the form, raising the Paint event.
We only need to be able to just draw the picture to the form on demand. In fact, we can get a graphics object that draws to the form. This would mean that the form will not be Invalidated and there won't be a large swath of form background flickering in places. And we'll still only have a single graphics drawing to the form per update, which means no flicker (hopefully). A Graphics object that draws to the form has to be created from the form (unless you happened to conveniently have the hWnd or hDC around somewhere) by way of the form's .CreateGraphics() function. Note that you should create as few graphics objects as possible, since these are somewhat limited resources.
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Backup = New Bitmap(200, 200)  '200x200 is the size of the memory bitmap, which will 
        'effectively be the size of the display, since nothing can go off of it.
        GFX = Graphics.FromImage(Backup)  'Draws to the memory buffer.
        FGFX = Me.CreateGraphics()  'Draws to the display (form).
    End Sub
        private void Form1_Load(object sender, EventArgs e)
        {
            backup = new Bitmap(200, 200);
            //200x200 is the size of the memory bitmap, which is effectively going to be the display size.
            gfx = Graphics.FromImage(backup);
            //Set gfx to draw to this backup bitmap.
            fgfx = this.CreateGraphics();
            //Set fgfx to draw to the display (form).
        }
Now, in order to do our on-demand drawing, we simply draw with fgfx just like we were drawing in the Paint event subroutine.
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        B += 10
        'B symbolizes the location of something moving on the form.
        GFX.FillRectangle(Brushes.Black, Me.ClientRectangle)
        GFX.FillRectangle(Brushes.DarkGoldenrod, New Rectangle(B, B, 100, 100))
        'Draws to the backup bitmap.
        FGFX.DrawImage(Backup, 0, 0)
        'Present the memory bitmap to the display.
    End Sub


    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        FGFX.DrawImage(Backup, 0, 0)
        'Present the memory bitmap to the display.
    End Sub
        void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            fgfx.DrawImage(backup, 0, 0);
            //Present memory bitmap to the display.           
        }

        void Form1_Click(object sender, System.EventArgs e)
        {
            b += 10;
            //b symbolizes a location of something on the form.
            gfx.FillRectangle(Brushes.Black, this.ClientRectangle);  //Black background.
            gfx.FillRectangle(Brushes.DarkGoldenrod, new Rectangle(b, b, 100, 100));

            fgfx.DrawImage(backup, 0, 0);
            //Present memory bitmap to the display.
        }
Bam! No more flickering. Double-buffering has saved the day. Now, it may be advantageous to move the present part into a subroutine of its own since the code is the same in the Click and in the Paint event.
    Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click
        B += 10
        'B symbolizes the location of something moving on the form.
        GFX.FillRectangle(Brushes.Black, Me.ClientRectangle)
        GFX.FillRectangle(Brushes.DarkGoldenrod, New Rectangle(B, B, 100, 100))
        'Draws to the backup bitmap.
        Present()
    End Sub

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        Present()
    End Sub

    Private Sub Present()
        FGFX.DrawImage(Backup, 0, 0)
        'Present the memory bitmap to the display.
    End Sub
        void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
        {
            Present();           
        }

        void Form1_Click(object sender, System.EventArgs e)
        {
            b += 10;
            //b symbolizes a location of something on the form.
            gfx.FillRectangle(Brushes.Black, this.ClientRectangle);  //Black background.
            gfx.FillRectangle(Brushes.DarkGoldenrod, new Rectangle(b, b, 100, 100));
            Present();
        }

        void Present()
        {
            fgfx.DrawImage(backup, 0, 0);
            //Present memory bitmap to the display.
        }
Also, sometimes the display will have to be redrawn frequently, so the Present() could be done in a timer.
    Private Sub Clock_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Clock.Tick
        Present()
    End Sub
        private void clock_Tick(object sender, EventArgs e)
        {
            Present();
        }
And that is the Iceplug Method of Flickerless Display.