C# for Windows Programming

Chris H. Pappas, William H. Murray

  • 出版商: Pearson Education
  • 出版日期: 2001-12-15
  • 定價: USD $44.99
  • 售價: $299
  • 語言: 英文
  • 頁數: 560
  • 裝訂: Paperback
  • ISBN: 0130932876
  • ISBN-13: 9780130932877



Jump into the future of Windows application programming with C#!

  • Powerful, rapid-development C# taught by the experts
  • Complete code examples make learning easy!
  • Includes two case study chapters presenting complete applications

C# is a new object-oriented programming language that combines the power and flexibility of C++ with the ease of Visual Basic(r). C# offers a radical departure from the traditional Windows application development process, and C# for Windows Programming gives you everything you need to get started in this next wave of Windows application programming.

Using their classroom-proven techniques, pioneering C# instructors Chris H. Pappas and William H. Murray examine the key features of C#, compare them with those of C and C++, develop working code, and discuss programming strategies. With C# for Windows Programming, you will be able to grasp all the key concepts of C# quickly and easily.

  • Learn C# essentials using Pappas and Murray's classroom proven techniques
  • Complete, working code examples walk you through concepts step by step
  • Includes case study chapters presenting financial and charting applications
  • Be among the first to learn the next need-to-know language!

Programmers and professionals already familiar with Visual Basic or C++ will find C# for Windows Programming the best way to get up to speed on C# quickly and easily!

Table of Contents

1. A Radically New Approach: C# and Windows.

Visual Studio .NET and C#. Building C# Applications. Additional Program Details. C# Programming Elements. Arrays. Attributes, Events, Indexers, Properties, and Versioning. Attributes. Events. Indexers. Properties. Versioning. Boxing, Unboxing, and Unified Type System. Classes, Structures, and Enum. Classes. Structures. Enum. Namespaces. Predefined Types. Statements. Blocks. Miscellaneous Statements. The do Statement. The foreach Statement. The if and if-else Statements. The Label and goto Statements. The switch (case-break) Statement. The while Statement. Value and Reference Types. Your first C# Windows Application. Additional Program Details. Namespaces. The Form. Designer Variables. Initializing Components. The Event Handler. The End. Summary.

2. User Interface Design Fundamentals.

Just Yesterday (or So It Seems). Why Use C# for Windows Projects? The C# Language and Windows Applications. Programming Based on Events. The Visual Studio Tools for C#. Standard Controls. Control Properties. Altering Default Control Properties. A Fast Method of Changing Properties for Several Controls. Object Names and Labels. Event Handlers. Changing Properties With Code. Creating Good User Interfaces. Elements of Good Design. Using the Grid. Control Fundamentals. Selecting a Control. Moving and Resizing Controls. The Tiny Control. Deleting a Control. Duplicating Controls. A Sales Tax Calculator. Sizing a Form. Selecting and Placing Label Controls. Selecting and Placing TextBox Controls. Designing With Additional Controls. GroupBox Control. CheckBox Control. RadioButton Control. ComboBox Control. ListBox Control. Horizontal and Vertical ScrollBar Controls. Timer Control. Good Design Techniques.

3. Design Time Control Properties.

Properties. Property Details. Changing Properties. Button Properties. CheckBox Control Properties. ColorDialog Box Control Properties. ComboBox Control Properties. DateTime Picker Properties. FontDialog Properties. Form Color Properties. GroupBox Control Properties. HscrollBar and VscrollBar Control Properties. Label Control Properties. ListBox Control Properties. MainMenu Properties. MonthCalendar Properties. PictureBox Control Properties. ProgressBar Properties. RadioButton Control Properties. TextBox Control Properties. ToolBar Properties. TrackBar Properties. Controlling Properties With Code.

4. Run Time Control Properties.

Coding Controls. Properties Plus Code. Event Handlers. Attaching Code to Objects. Dynamically Modifying Control Properties. Button Properties. CheckBox Control Properties. DateTimePicker Properties. Form Color Properties. HscrollBar and VscrollBar Control Properties. Label Control Properties. ListBox Control Properties. MonthCalendar Properties. PictureBox Control Properties. ProgressBar Properties. RadioButton Control Properties. TextBox Control Properties. TackBar Properties. Another Pass at the Sales Tax Calculator. Right Control, Right Job. Project Code. Looking Ahead.

5. Events.

A Quick Review of Event Handlers. Events. Activate. ButtonClick. ButtonDropDown. CheckStateChanged. CheckedChanged. Click. Closed. CloseUp. Closing. DateChanged. DateSelected. Deactivate. DoubleClick. DragDrop. DragEnter. DragLeave. DragOver. DrawItem. Enter. Format. FormatQuery. Give Feedback. Help. InputLangChange. InputLangChangRequest. KeyDown. KeyPress. KeyUp. Layout. Leave. MDIChildActivate. MenuComplete. MenuStart. MouseDown. MouseEnter. MouseHover. MouseLeave. MouseMove. MouseUp. Move. PanelClick. QueryContinueDrag. Resize. Scroll. TextChanged. UserString. Validated. Validating. ValueChanged. Events, Events, Events.

6. Input. Controls and Forms. Using TextBox Controls. TextBox ScrollBars. Speeding? Who Me? Using RadioButton Controls. Using CheckBox Controls. Using ScrollBar Controls. Mouse. More Input?
7. Multiple Forms, Menus and Common Dialog Boxes.

Multiple Forms. Menus. Coding Menu Items. Placing Check Marks on Menu Selections. Common Dialog Boxes. Adding a ColorDialog Dialog Box. ColorDialog Dialog Box Properties. The CommDialog1 Project Code. Adding a FontDialog Dialog Box. FontDialog Dialog Box Properties. The CommDialog2 Project Code. Unique User Input.

8. Output.

Send It Out. MessageBox Output. Output With TextBox or Label Controls. Output With a Multiline TextBox Control. Tabular Output Using a TextBox Control. Tabular Output Using a Form. Output to a Printer. Other Output Techniques and Formatting.

9. Graphics Fundamentals.

The System.Drawing Namespace. Graphics Class Details. System.Drawing.Drawing2D Namespace. Graphics Class Details. The Graphics Class for C#. Coordinate System. Drawing Surfaces. Graphics Properties. Colors Line Drawing Styles. Brush Fill Styles. The DrawAndFill Project. Graphics Drawing Primitives. DrawArc. DrawEllipse. DrawLine. DrawPie. DrawPolygon. DrawRectangle. DrawString. FillElipse. FillPie. FillPolygon. FillRectangle. The DrawingPrimitives Project. Other Graphical Techniques.

10. Pictures And Graphics.

Displaying an Image or Picture. Bitmap Project Code. A Simple Animation Example. Flags Project Code. A Charting Project. BarChart Project Code. Code for Form1. Code for Form2. Testing the BarChart Project. What's Coming?

11. Numeric Examples.

Base Change Calculator. Prime Number Counter. Trigonometric Table. Form2. Form1. Finding Number of Days in a Month. Time of Day. Statistics. Sort. What's Coming?

12. Financial Applications.

Regular Deposits in an Account. Developing the Future Value Code. Invest Regularly and Reap the Benefits. Regular Withdrawals From an Account. Developing The Project Code for Regular Withdrawals. Stretching Out a Retirement Pension. Depreciation of an Asset. Attaching Code to the Form. Asset Depreciation and Data Sharing. Payment on a Loan. Developing Code for Payments on a Loan. Viewing Loan Payment Options. A Mortgage Amortization Table. Coding the Mortgage Projects. Form2 Code. Form1 Code. A Possible Income Tax Deduction. What's Coming?

13. Professional-Quality Bar and Pie Charts.

A Bar Chart. Developing the Bar Chart Code. Form2: Data Entry. Form1: Chart Plotting. Drawing Unique Bar Charts. A Pie Chart. Coding the Pie Chart. Form2: Data Entry. Form1: Chart Plotting. Drawing Unique Pie Charts. What's Coming?