You didn't import the correct classes.

At the top of the class file you should have added
vb Code:
  1. using System.Drawing;