Creating the User Interface of Your Project
Now that you've written this example's procedures, 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:
Property | Value |
---|---|
Name | btnDrawEllipse |
Location | 0,0 |
Size | 80,23 |
Text | Draw Ellipse |
Add a second button to the form and set its properties as follows:
Property | Value |
---|---|
Name | btnClearEllipse |
Location | 283,0 |
Size | 80,23 |
Text | Clear Ellipse |
Finally, add the third button to the form and set its properties as follows:
Property | Value ... |
---|
Get Sams Teach Yourself C#™ 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.