Summary


In this hour, you learned how to present text to a user. You learned that the Label control is perfect for displaying static text (text the user can't change) and that the text box is the control to use for displaying editable text. You can now create text boxes that contain many lines of text, and you know how to add scrollbars when the text is greater than what can be displayed in the control.

I don't think I've ever seen a form without at least one button on it, and you've now learned how to add buttons to your forms. For the most part, working with buttons is a simple matter of adding one to a form, setting its Name and Text properties, and adding some code to its Click eventall of which you now know how to do.

Check boxes and radio buttons are used to present True/false and mutually exclusive options, respectively. In this hour, you learned how to use each of these controls and how to use group boxes to logically group sets of related controls.

Finally, you learned how to use list boxes and combo boxes to present lists of items to a user. You now know how to add items to a list at design time as well as runtime, and you know how to sort items. The List Box and Combo Box are powerful controls, and I encourage you to dig deeper into the functionality they possess.

Without controls, users would have nothing to interact with on your forms. In this hour, you learned how to use the standard controls to begin building functional interfaces. The controls discussed in this hour have been around since the early days of Visual C#, and in fact, behave much like they did years ago. Keep in mind that I only scratched the surface of each of these controls and that most do far more than I've hinted at here. Mastering these controls will be easy for you because you'll be using them a lot. Also, as you progress through this book, you will add code that "hooks up" the controls you placed on your Options form.




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