Or, use the CreateGraphics method of your form/control to get a reference to a valid Graphics object.