Change all refrences from "Form1" that are in "Form1" to Me
You need to refer to an instance of a class, not a class. In .NET a form is a class. Next, you can't use the line method. For:
Form1.picture1.line
change to
Me.Picture1.CreateGraphics.DrawLine()
I don' feel like changing that all, but you can probably fix that much.

Also, replace .HDC
with .Handle

This should solve most if not all of your problems