Software Design Using C++Third Intermediate Windows Forms ExampleThe ChangesTake your previous Windows Forms App, made with the directions for C#, and modify it as follows. We add a class function (a method) for finding the area and call this function from the click handler.
Try It OutSave all of your files. Build your project and then start it without debugging. Class ViewThis is an appropriate place to take a look at Class View. It often appears on a tab next to Solution Explorer. If not, look for it under the View menu. After you click on this tab, it should show you the name of your project. If you click on the small triangle in front of this, it will expand to show you the namespace that contains your code. Right click on this namespace and select View Class Diagram. In the resulting class diagram you can click on the downward arrowlike symbol in the upper right corner of the Form1 class to see what is inside this class. What you see will be the fields and methods of the class. Some of those methods are ones that you created. Finally, at the bottom of the window you will see a Class Details section showing more information about the fields, properties, methods, and events for this class. You can even add the outline for a new method in this deails section. Back to the main page for Software Design Using C++ |