1. Home
  2. Computing & Technology
  3. Visual Basic

Chapter 4 - Working With Menus and Dialog Boxes - Part 3

By , About.com Guide

6 of 10

Notes about the Solution Code - Page 1

A few notes about this solution (note - line continuations are used a lot to keep the lines short so they display in a web page better) ...

The first thing you might notice is that I left my debug statements in. Statements like:

~~~~~~~~~~~~~~~~~~~~~~~~~
Debug.Write("Index1 True - Radio1 True" & vbCrLf)
~~~~~~~~~~~~~~~~~~~~~~~~~

These aren't necessary to make the program work, but I thought you might like to see them. Their only purpose is to write diagnostic statements to the Output window in VB.NET so I could watch what the program was doing more easily while I wrote it. In a release version, these statements would normally be deleted. Debugging is a topic that deserves a whole book by itself. Consider this just an introduction to the idea.

If statement blocks are used to select an image to display. In Chapter 4, the book also uses some conditional logic (the If statement blocks) and makes the note that more will be covered in Part II. Actually, a better way to do this would probably be a Select Case structure and an even better way still would be a database.

Explore Visual Basic
By Category
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB.NET
  5. Working With Menus and Dialog Boxes - Part 3

©2009 About.com, a part of The New York Times Company.

All rights reserved.