Hour 5. Building FormsThe Basics


What You'll Learn in This Hour:

  • Changing the name of a form

  • Changing the appearance of a form

  • Displaying text on a form's title bar

  • Adding an image to a form's background

  • Giving a form an icon

  • Preventing a form from appearing in the taskbar

  • Specifying the initial display position of a form

  • Displaying a form in a normal, maximized, or minimized state

  • Changing the mouse pointer

  • Showing and hiding forms

With few exceptions, forms are the cornerstones of every Windows application interface. Forms are essentially windows, and the two terms are often used interchangeably. More accurately, window refers to what's seen by the user and what the user interacts with, whereas form refers to what you see when you design. Forms enable users to view and enter information in a program (such as the form you built in your Picture Viewer program in Hour 1, "Jumping In with Both Feet: A Visual C# 2005 Programming Tour"). Such information may be text, pictures, graphsalmost anything that can be viewed on the screen. Understanding how to design forms correctly enables you to begin creating solid interface foundations for your programs.

Think of a form as a canvas on which you build your program's interface. On this canvas, you can print text, draw shapes, and place controls with which users can interact. The wonderful thing about Visual C# forms is that they behave like a dynamic canvas; not only can you adjust the appearance of a form by manipulating what's on it, you can also manipulate specific properties of the form itself.

In previous hours, you manipulated a few basic properties of a form.

The capability to tailor your forms goes far beyond these basic property manipulations, as you'll see.

There's so much to cover about Windows forms that I've broken the material into two hours. In this hour, you'll learn the basics of formsadding them to a project, manipulating their properties, and showing and hiding them using Visual C# code. Although you've done some of these things in previous hours, here you'll learn the nuts and bolts of the tasks you've performed. In the next hour, you'll learn more advanced form techniques.




Sams Teach Yourself Microsoft Visual C# 2005 in 24 Hours, Complete Starter Kit
Sams Teach Yourself Visual C# 2005 in 24 Hours, Complete Starter Kit
ISBN: 0672327406
EAN: 2147483647
Year: N/A
Pages: 248
Authors: James Foxall

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net