Interface Design in Visual Basic .NET

Drawing PDF417 in Visual Basic .NET Interface Design

Interface Design
PDF-417 2d Barcode Creator In Visual Basic .NET
Using Barcode creator for Visual Studio .NET Control to generate, create PDF 417 image in VS .NET applications.
www.OnBarcode.com
PDF 417 Decoder In Visual Basic .NET
Using Barcode scanner for VS .NET Control to read, scan read, scan image in .NET applications.
www.OnBarcode.com
The UI application can be found within the ProjectTracker solution. The project is named PTWin. The design of the PTWin interface is that of a single main form with a menu and status bar. This
Encode Barcode In VB.NET
Using Barcode encoder for .NET framework Control to generate, create Barcode image in .NET applications.
www.OnBarcode.com
Draw QR Code In Visual Basic .NET
Using Barcode generation for .NET framework Control to generate, create QR Code image in Visual Studio .NET applications.
www.OnBarcode.com
CHAPTER 9 s WINDOWS FORMS UI
Linear Creator In Visual Basic .NET
Using Barcode generator for Visual Studio .NET Control to generate, create Linear 1D Barcode image in .NET applications.
www.OnBarcode.com
PDF-417 2d Barcode Printer In Visual Basic .NET
Using Barcode generator for VS .NET Control to generate, create PDF-417 2d barcode image in .NET framework applications.
www.OnBarcode.com
main form dynamically loads user controls and displays them to the user. Figure 9-1 shows what the main form looks like.
Data Matrix Generation In Visual Basic .NET
Using Barcode encoder for .NET framework Control to generate, create ECC200 image in Visual Studio .NET applications.
www.OnBarcode.com
GTIN - 14 Printer In Visual Basic .NET
Using Barcode generator for VS .NET Control to generate, create ITF14 image in .NET applications.
www.OnBarcode.com
Figure 9-1. Appearance of the main form
Decoding PDF-417 2d Barcode In Java
Using Barcode scanner for Java Control to read, scan read, scan image in Java applications.
www.OnBarcode.com
PDF417 Drawer In None
Using Barcode printer for Microsoft Excel Control to generate, create PDF417 image in Excel applications.
www.OnBarcode.com
Notice that the menu bar includes menus that deal with projects, resources, roles, and authentication. When the user chooses a menu option, a user control is dynamically loaded into the main area of the form. Figure 9-2 shows the application while the user is editing a project.
Recognize Barcode In .NET
Using Barcode recognizer for .NET framework Control to read, scan read, scan image in .NET framework applications.
www.OnBarcode.com
Paint Data Matrix 2d Barcode In Objective-C
Using Barcode maker for iPhone Control to generate, create DataMatrix image in iPhone applications.
www.OnBarcode.com
Figure 9-2. Editing a project
Code 39 Full ASCII Scanner In C#
Using Barcode recognizer for Visual Studio .NET Control to read, scan read, scan image in .NET applications.
www.OnBarcode.com
Decode UPC - 13 In C#.NET
Using Barcode reader for VS .NET Control to read, scan read, scan image in .NET applications.
www.OnBarcode.com
CHAPTER 9 s WINDOWS FORMS UI
Scan Barcode In .NET Framework
Using Barcode Control SDK for ASP.NET Control to generate, create, read, scan barcode image in ASP.NET applications.
www.OnBarcode.com
Printing Data Matrix 2d Barcode In Java
Using Barcode generator for Android Control to generate, create ECC200 image in Android applications.
www.OnBarcode.com
Of course, there are some dialog windows used to collect input from the user as well, but the bulk of the application s functionality centers around the use of user controls hosted by the main form. Table 9-1 lists the forms and controls that make up the interface. Table 9-1. Forms and User Controls in PTWin
Making Code 128A In Objective-C
Using Barcode encoder for iPhone Control to generate, create Code 128 image in iPhone applications.
www.OnBarcode.com
EAN / UCC - 13 Reader In None
Using Barcode decoder for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Form/Control
Printing PDF 417 In Java
Using Barcode creator for Java Control to generate, create PDF 417 image in Java applications.
www.OnBarcode.com
UPCA Generation In .NET
Using Barcode drawer for VS .NET Control to generate, create GS1 - 12 image in Visual Studio .NET applications.
www.OnBarcode.com
MainForm LoginForm RolesEdit ProjectSelect ProjectEdit ResourceSelect ResourceEdit
Type
Form Form Control Form Control Form Control
Description
The main form for the application A login dialog to collect user credentials Allows the user to edit the list of roles A dialog prompting the user to select from a list of projects Allows the user to view, add, or edit a project A dialog prompting the user to select from a list of resources Allows the user to view, add, or edit a resource
It is very important that you understand that all the data binding and business functionality covered in this chapter works exactly the same with regular forms as it does with user controls. I am using user controls in this chapter because I think it is a best practice for Windows Forms UI design, but this has no impact on the way data binding is used to create the UI against the business objects created in 8. The user control approach taken in this chapter gives you a great deal of flexibility. You can host the user controls, as shown in this chapter, you can host them in child forms in an MDI interface, or you can host them in panes in a multipane interface. In short, by creating your forms as user controls, you gain the flexibility to use them in many different types of UI design.
User Control Framework
Dynamically loading a user control isn t difficult. The code needs to follow this basic process: 1. Create the control. 2. Add the control to the form s Controls collection. 3. Set the control s properties for size/position. 4. Make the control visible (Visible = True). 5. Set the control s z-order (BringToFront()). This is simple enough however, integrating the user controls into the main form display nicely requires some extra work. In particular, the UI in this chapter supports the following: A Documents menu Notification when the user logs in or out Bringing an existing control forward when appropriate Centralized status text and cursor handling Let s quickly discuss what I mean by each of these bullet points. If you look at Figure 9-1, you ll notice that there s a Documents item on the menu bar, but it s disabled. In Figure 9-2, it s enabled. This is because there s now a document (user control) loaded in the application. In fact, multiple documents can be loaded at the same time, and this Documents menu allows the user to switch between them.
CHAPTER 9 s WINDOWS FORMS UI
s Note
This application uses a Documents menu rather than a Windows menu because the menu allows the user to switch between various documents, not between windows. If you were creating a user interface in which the user chooses to display or arrange different windows, you would name the menu Windows.
Both figures also show that the user is logged in with the name rocky, and that there s a Logout button available on the menu bar. Look back at Figure 9-2 and notice how the user is allowed to edit the fields in the form. Now look at Figure 9-3, in which the user is not allowed to edit any of the fields.
Copyright © OnBarcode.com . All rights reserved.