Showing and Hiding Forms

Part III, “Making Things Happen—Programming,” is devoted to programming in Visual C# .NET, and I've avoided going into much programming detail in this hour so that you can focus on the concepts at hand. However, knowing how to create forms does nothing for you if you don't have a way to show and hide them; Visual C# .NET can display a single form automatically only when a program starts. To display other forms, you have to write code.

Showing Forms

In Visual C#, everything is an object, and objects are based on classes (see Hour 16, “Designing Objects Using Classes,” for information on creating classes). Because the definition of a form is a class, you have to create a new Form object using the class as a template. In ...

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.