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
Last change: February 13 2016 18:48:19.

 Chapter in PDF

Table of Contents

Chapter 10: Special Topics in Data Entry
Last change: February 13 2016 18:47:25.

10.6 Providing Visual Clues

Imagine that you are using a program written by someone else. The program will process a large database in a complex manner and will take a few hours. When you click the Start Process button, you see nothing taking place. What would be your reaction? You might think that maybe you did not click the button properly or, for whatever reason, that the computer did not register the click. So you would most likely click the button one more time. If nothing happens again, you might click it again and again. What if it turns out that the program actually has started the process on the first and all subsequent clicks? It may take several days before all the repeated processes are completed. For fear that the program may have been so (carelessly) designed that it can ruin your database if you attempt to stop the process, you may have no choice but wait.
As a user, you’d wish that this program had provided immediate visual feedback! When  the user clicked the button, if it had somehow acknowledged the click by, say, disabling that button, the user would not have clicked the button another time. (Furthermore, the program should not start the process the second time.) Because it is a long process, the user would rather the computer indicate where the process is as it progresses. Finally, in each processing step, the computer should inform the user of the percentage of completion. All of these steps assure the user that everything is progressing without any problems, alleviating the user’s anxiety in deciding what to do next (if anything).

When a process should be carried out only once in the duration of the project, be sure to disable the button that initiates the process once it is started. For example, assume that the button to initiate a process is named btnProcess. You should then insert a statement to disable the button in its click event as follows:
Private Sub btnProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handle btnProcess.Click btnProcess.Enabled = False ‘Other statements to start to process End Sub
A long process should be handled similarly, even if it can be initiated more than once. In the latter case, insert a statement to enable the button at the end of the click event procedure.
Last change: February 13 2016 18:47:24.
  1. A User’s Nightmare
  2. The Try…Catch…Finally…End Try Structure
  • 10.6 Providing Visual Clues
    1. Listing Prime Numbers: An Illustrative Example
    2. The Prime Number Computing Algorithm
    3. The Cursor
    4. Messages for Progress Status
    5. The Progress Bar
    6. <<PreviousNext>>