|
Last Modified 5-1-2010 |
IUSB |
|||||||||||||||||||||||||||||
|
Home C# Introduction to C# .NET FrameworkVS2008 IDE How C# is Compiled Start Visual Studio Windows Form App C# Code Example C# Coding Rules RecommendationsError Window C# Comments C# Help Window Language Essentials C# Data Types Declare Variables Declare Constants Arith. Expressions Assign Statements Operator Precedence Type CastingMath Class C# Strings String Esc Sequences Convert Data Types ToString Formatting Variable Scope UseC# Enumeration Use C# Nullable Types Program #2 C# Code Control Relational OperatorsLogical Operators If-Else Statement Switch Statement |
Windows Forms Application Design Page 2After the Common Controls Toolbox subsection is opened the Visual Studio Integrated Development Environment should appear as in the diagram below:
A Textbox Control needs to be placed on the Design Form in the approximate location indicated in Figure CS-13. The procedure for placing a control on the Design Form, which is located in the Toolbox is as follows:
Once the TextBox control is placed on the Design Form. We can facilitate placement of the remaining controls by locking the Toolbox menu in the Open Position by Left-Clicking on the Thumb Tack and having the needle point downward as illustrated in the diagram below:
After locking the toolbox in the open position, repeat the procedure for 2 buttons, 4 labels and 3 more textboxes. The number of controls required and their location in the toolbox is illustrated in Figure CS-14. Repeat the procedure outlined above for placing controls on the design form until your form looks like the diagram illustrated below in Figure CS-15:
During placement of the controls, Visual Studio will assist you in the placement of your components by drawing vertical and horizontal guidelines on the screen to notify you when your controls are aligned with other controls allowing you to quickly line up your controls symmetrically. Once your controls are placed on your Visual Studio Design Form as indicated in Figure CS-15, place the mouse pointer over the TextBox control and right-click your mouse to bring up the Control Options Dialog Box as indicated in Figure CS-16 below:
Move the mouse pointer to the Properties option of the Visual Studio Control Options Dialog Box and right-click to bring up the Visual Studio Control Properties window as indicated below in Figure CS-17:
When the Properties Window is displayed on your screen - change the Property Values on the right-side of the Properties window as illustrated above and described below:
After changing the properties for TextBox2, perform the same procedure for all other controls and the Form using the Property values indicated below in Figure CS-18:
Make sure the Form Properties are set last as they use the new control properties for some of the values. In each subdivision the Properties are in alphabetical order. However, it is important to know under which subdivision each of the properties is located. The Form Subdivisions are addressed on page 3. Select Next to continue the Windows Form Application Tutorial: |
|