Creating the User Interface of Your Project

Now that you've written all of the procedures for this example, you need to create the interface for the project. Click the Form1.cs [Design] tab in the IDE to display the form designer for the default form.

You'll need three buttons on this form—one to call each of your methods. Add the first button to the form by double-clicking the Button icon in the toolbox, and then set its properties as follows:

PropertyValue
NamebtnDrawEllipse
Location0,0
Size80,23
TextDraw Ellipse

Add a second button to the form and set its properties as follows:

PropertyValue
NamebtnClearEllipse
Location283,0
Size80,23
TextClear Ellipse

Finally, add the third button to the form and set its properties as follows:

PropertyValue
Name

Get Sams Teach Yourself Microsoft® Visual C#™ .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.