Interacting with .NET WinForms, Part 2 Utah

We conclude our tutorial on working with Windows Forms in Microsoft.NET. Here, we'll examine some of the important GUI Controls and their application in C#.

Local Companies

Ibs
(801) 424-1367
4028 S 2700 E
Salt Lake City, UT
Nautical Computer
(435) 257-3279
12 W Main St
Tremonton, UT
Geekbox Computers
(801) 566-4335
West Jordan, UT
Ebc Computers
(801) 886-0100
1825 Research Way Ste B
Salt Lake City, UT
K N L Computers Networking
(801) 208-3036
1218 W South Jordan Pkwy
South Jordan, UT
XS Computer Solutions, Inc
801-779-3022
5523 South 1900 West
Roy, UT
Expercom
(801) 313-0321
256 E Winchester St
Salt Lake City, UT
Canon Business Solutions-Mountain West Inc
(801) 461-7600
332 Bugatti Dr
Salt Lake City, UT
Specialized Business Systems
(801) 572-0667
11617 Terendale Ln
Sandy, UT
Sun Microsystems
(801) 561-1091
7090 Union Park Ctr Ste 520
Midvale, UT

provided by: 
Originally published at Internet.com


We use a lot of controls like Buttons, Label, Checkbox, Radio Button, Text boxes, etc. while developing a GUI application. .NET provides a wide range of class, properties, and events for developing a complete GUI program by using the Control class of System.Windows.Forms namespace. In this part of our tutorial, I'll examine some of the important GUI Controls and their application in C#.

General Method for Adding Controls to Forms



1. Create an instance of the control. 2. Apply necessary properties like location, size, width, height, etc. 3. Finally, add the Control object to the Form's Controls Collection.

Using TextBox



Generally, Text boxes are of two classes, viz., Single line and multiple line boxes. Multiple line boxes have scroll bars. Also, users can enter more lines of text in them. The superclass of TextBox Control is TextBoxBase. It also provides functionalities for advanced controls like RichTextBoxes.

The following listing shows the usage of TextBox by examining important properties. Keep in mind that some of the properties derive from the TextBoxBase class. TextBox class provides only a limited set of properties. Listing 1.

using System; using System.Windows.Forms; using System.Drawing; public class Text: Form { // Text box object created TextBox t1 = new TextBox(); Text() { // Text box added this.Controls.Add(t1); t1.Location = new Point(50,50); t1.Size = new Size(200,50); t1.Text = "Class something to test"; t1.Multiline = true; t1.ScrollBars = ScrollBars.Vertical; t1.TextAlign = HorizontalAlignment.Center; t1.CharacterCasing = CharacterCasing.Upper; } public static void Main() { Application.Run(new Text()); } } ...

Read article at Internet.com site

Featured Local Company

XS Computer Solutions, Inc

801-779-3022
5523 South 1900 West
Roy, UT

Related Articles
- Devexpress ASPxGridView Utah
Devexpress has a commitment to providing amazing ASP.NET (and other controls), such as their latest revision of their ASPxGridView, version 8.3, which supports filtering, grouping, sorting, and much more, with little or no coding on your part.
- Interacting with .NET WinForms, Part 1 Utah
- Encrypting a File Using .NET Utah
- C# Tips and Tricks Utah
- PostgreSQL Ends the Waiting Game Utah
- An Active Server Pages Tutorial, Part 2 Utah
- Creating a Rounded Panel Control Utah
- An Active Server Pages Tutorial, Part 1 Utah
Regional Articles
- Interacting with .NET WinForms, Part 2 American Fork UT
- Interacting with .NET WinForms, Part 2 Bountiful UT
- Interacting with .NET WinForms, Part 2 Brigham City UT
- Interacting with .NET WinForms, Part 2 Cedar City UT
- Interacting with .NET WinForms, Part 2 Centerville UT
- Interacting with .NET WinForms, Part 2 Clearfield UT
- Interacting with .NET WinForms, Part 2 Draper UT
- Interacting with .NET WinForms, Part 2 Kaysville UT
- Interacting with .NET WinForms, Part 2 Layton UT
- Interacting with .NET WinForms, Part 2 Lehi UT
- Interacting with .NET WinForms, Part 2 Logan UT
- Interacting with .NET WinForms, Part 2 Magna UT
- Interacting with .NET WinForms, Part 2 Midvale UT
- Interacting with .NET WinForms, Part 2 Ogden UT
- Interacting with .NET WinForms, Part 2 Orem UT
- Interacting with .NET WinForms, Part 2 Park City UT
- Interacting with .NET WinForms, Part 2 Pleasant Grove UT
- Interacting with .NET WinForms, Part 2 Provo UT
- Interacting with .NET WinForms, Part 2 Riverton UT
- Interacting with .NET WinForms, Part 2 Roy UT
- Interacting with .NET WinForms, Part 2 Saint George UT
- Interacting with .NET WinForms, Part 2 Salt Lake City UT
- Interacting with .NET WinForms, Part 2 Sandy UT
- Interacting with .NET WinForms, Part 2 South Jordan UT
- Interacting with .NET WinForms, Part 2 Spanish Fork UT
- Interacting with .NET WinForms, Part 2 Springville UT
- Interacting with .NET WinForms, Part 2 Tooele UT
- Interacting with .NET WinForms, Part 2 Vernal UT
- Interacting with .NET WinForms, Part 2 West Jordan UT
Related Articles
- Creating a Rounded Panel Control Utah
This article talks about how to make your user interfaces a little jazzier with a rounded rectangle Panel control; a fun chunk of code to incorporate into your application.
- An Active Server Pages Tutorial, Part 2 Utah
- Devexpress ASPxGridView Utah
- An Active Server Pages Tutorial, Part 1 Utah
- PostgreSQL Ends the Waiting Game Utah
- C# Tips and Tricks Utah
- Interacting with .NET WinForms, Part 1 Utah
- Encrypting a File Using .NET Utah

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML