Tutorial : windows application with C# / PDF



Tutorial : windows application with C# / PDF





Tutorial : windows application with C# / PDF






Table of Contents





PART I: Developing Window Applications

1 Introducing Windows Forms 
Introduction .
Key Concepts ........
An Overview of the .NET Framework ..........................
An Overview of the Development Tools ............................................................................27
Understanding Classes, Inheritance, and Namespaces ..................................................29
Creating a Windows Forms Application ..................................................................................32
Using the System.Windows.Forms.Form Class ....................................................................33
Designing a Windows Form by Using the Windows Forms Designer ..................34
Exploring the Generated Code ..............................................................................................37
Running a Windows Form ......................................................................................................40
Using the Application Class ....................................................................................................42
Using the MessageBox Class ......................................................................................................46
Setting and Adding Properties to a Windows Form ............................................................48
Using the Visual Designer to Set Windows Form Properties ....................................48
Setting Windows Form Properties Programmatically ..................................................51
Adding New Properties to a Windows Form ....................................................................57
Using Visual Inheritance ..................................................................................................................61
Event Handling ..................................................................................................................................64
Handling Events by Attaching a Delegate ........................................................................65
Handling Events by Overriding a Protected Method of a Base Class ....................71
Building Graphical Interface Elements by Using the System.Drawing
Namespace ..........................................................................................................................................76
Understanding the Graphics Objects ..................................................................................77
Understanding the Windows Forms Coordinate System ............................................78
Drawing Text on a Form ..........................................................................................................79
Drawing Shapes ............................................................................................................................85
Working with Images ..................................................................................................................94
Exercises ........................................................................................................................................102


2 Controls 
Introduction ......................................................................................................................................116
Adding Controls to a Windows Form ....................................................................................116
Adding Controls by Using the Windows Forms Designer ......................................117
Adding Controls Programmatically ....................................................................................118
Setting Properties of Controls ....................................................................................................120
Important Common Properties of Controls ..................................................................121
Configuring the Order of Tabs ............................................................................................125
Handling Control Events ..............................................................................................................126
Dialog Boxes ......................................................................................................................................135
Common Dialog Boxes ..........................................................................................................135
Creating a Custom Dialog Box ............................................................................................139
Common Windows Forms Controls ......................................................................................142
The Label and LinkLabel Controls ....................................................................................143
The TextBox and RichTextBox Controls ..........................................................................146
The PictureBox Control ........................................................................................................148
The GroupBox and Panel Controls ......................................................................................149
The Button, CheckBox, and RadioButton Controls ......................................................151
The ListBox, CheckedListBox, and ComboBox Controls ..............................................155
The DomainUpDown and NumericUpDown Controls ..........................................................165
The MonthCalendar and DateTimePicker Controls ......................................................168
The Timer........................................................................................................................................172
The rackBar, and ProgressBar Controls ........................................................................177
The HScrollBar and VScrollBar Controls ......................................................................180
The TabControl Control ........................................................................................................183
Creating Menus and Menu Items ............................................................................................187
The MainMenu Control ..............................................................................................................189
The ContextMenu Control ......................................................................................................197
The StatusBar Control ..........................................................................................................203
The ToolBar Control ................................................................................................................207
Creating MDI Applications ........................................................................................................210
Exercises ........................................................................................................................................218
Review Questions ......................................................................................................................220

3 Error Handling for the User Interface
Introduction ......................................................................................................................................231
Understanding Exceptions ............................................................................................................231
Handling Exceptions ......................................................................................................................234
The try Block ..............................................................................................................................235
The catch Block ........................................................................................................................235
The throw Statement ................................................................................................................239
The finally Block ....................................................................................................................240
Creating and Using Custom Exceptions ................................................................................244
Managing Unhandled Exceptions ............................................................................................250
Validating User Input ....................................................................................................................255
Keystroke-Level Validation ....................................................................................................256
Field-Level Validation ..............................................................................................................258
Enabling Controls Based on Input ....................................................................................263
Other Properties for Validation ............................................................................................264
Exercises ........................................................................................................................................270
 Testing and Debugging a Windows Application
Introduction .
Testing .................................
Creating a Test Plan
Executing Tests
Testing International Applications
Tracing
Using Trace and Debug to Display Information ............................................................786
Trace Listeners ............................................................................................................................789
Trace Switches ............................................................................................................................793
Conditional Compilation ......................................................................................................797
Debugging ..........................................................................................................................................802
Stepping Through Program Execution ............................................................................803
Setting Breakpoints ..................................................................................................................806
Analyzing Program State to Resolve Errors ....................................................................809
Debugging on Exceptions ......................................................................................................813
Debugging a Running Process ............................................................................................












Tutorial : windows application with C# / PDF






2 commentaires:


  1. Really nice topics you had discussed above. I am much impressed. Thank you for providing this nice information here.
    Hire Windows Application Developer

    RépondreSupprimer
  2. Very thank You!
    Really appreciate!

    RépondreSupprimer