Can someone help me with this?...

I want to draw simple graphics such as rectangles or lines to a bitmap instead of using the Me.creategraphics method. The only problem is: I don't know how to draw to a bitmap.