Visual Basic 2008 Programming: Business Applications with a Design Perspective
Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9
Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Appendix A Appendix B Appendix C Home
Loading
Last change: February 13 2016 18:48:19.

 Chapter in PDF

Table of Contents

Chapter 3: User Interface Design: Visual Basic Controls and Events
Last change: February 13 2016 18:47:26.
<<PreviousNext>>

3.6   VB Controls in the Design of a Data-Entry Interface: Recapitulation

You have been introduced to many VB controls in this chapter. These controls have been considered in the context of data-entry interface design. In the process, a few design principles have been presented, including the following:

The text box is considered the most versatile control in accepting any kind of text or numeric data from the user; however, the user must key in every character the data field is expected to contain. The longer the data field, the higher the possibility that the user will enter a wrong key, in addition to the lengthier time for the entry. Whenever the text box is used as a field for data input, you should be prepared to write code to check for data validity.
Alternatives to the text box should be considered when applicable. One such situation is when the input fits a specific pattern, such as dates and Social Security numbers. In such cases, masked text boxes should be used to help reduce the number of keystrokes and filter out keys that do not fit the expected pattern.
Another situation in which alternatives to the text boxes can be considered is when the data elements are known before the program starts. In this case, if the number of available choices is small, such as gender or names of meals, radio buttons and check boxes should be used. The key criterion in choosing between these two types of controls is whether the known choices are mutually exclusive or independent of each other. If the choices are mutually exclusive, you should use radio buttons. If the choices are independent of each other, you should use check boxes.
As the number of known items grows, or if the items can change, the list box or combo box should be considered. The choice between the two depends on several factors, such as the nature of the choice (mutual exclusiveness), space availability in the form, possibility that data have to be added by the user, and their visual effect on the form layout. If the available known choices are not mutually exclusive, you can use only the list box, which has the SelectionMode property whose setting determines whether multiple selections are allowed. Otherwise, you can decide between the two VB controls based on additional characteristics of the data. If at run time the list of known data is not exhaustive such that the user may still have to enter data not already included in the list, you should use the combo box. In addition, if space on the form is limited, the combo box will be preferred; otherwise, whichever gives a better fit for the layout should be chosen.
Containers such as group boxes are presented as a necessity to group logically related radio buttons in order for the latter to function properly. Containers are also desirable and needed to group logically related data fields together. They not only make the layout of the form neater, but also make it easier for the user to anticipate the type of data fields in the group. This can enhance data-entry efficiency. As the number of data fields for a data entry screen becomes too big, the tab control can be used. In such case, each tab should contain data of the first level major grouping. Other containers can then be used for the sub-groupings.
The picture box can be used to enhance the appearance and attractiveness of visual interfaces. The picture box can also be used for the user to initiate actions because it also has a Click event. Note, however, that the button can also display images. The choice between the two is a matter of style. In general, the button uses less system resources, and should be the preferred alternative in this context.

Last change: February 13 2016 18:47:28.
  1. The Picture Box
  • 3.6 VB Controls in the Design of a Data-Entry Interface: Recapitulation
  • 3.7 Naming the Controls and Setting the Tab Order
    1. Naming Convention: Suggested Name Prefixes
    2. Setting the Tab Order
    3. <<PreviousNext>>