Working with Graphics in C#

In this assignment you will create a graphical control that draws an image to the screen.

Your Tasks

In this project, you must define a new class called "MyName" that inherits from Control.  This class should overload the OnPaint method.  Nothing else is required.  In the OnPaint method, you should have the control draw your first name; if your first name has more than 6 characters, it's OK to just draw the first 6 characters.

Useful methods of the Graphics API include (but are not limited to):

Once you've defined the class, you must write a program that adds an instance of your MyName class to the main form and displays it on the form.  Remember to set the Top, Left, Height, Width, and Owner properties of your MyName object.  Additionally, make sure you add your MyName object to the Controls collection of the main form.  See lecture 26 posted material for samples on how to do this type of program.

For extra credit, be creative and do some "cool" things with your graphics.


Other Resources

Your finished project should look something like this (with your name, of course):