VB Programming

Radio Buttons & Check Boxes

Radio Buttons
These controls are similar in that they let the user select from a set of options. They are different in that Radio Buttons only allow one of the set to be selected at a time, while Check boxes, if used in a set, can have several in the set turned on at the same time. Selecting one Radio Button means all other buttons in the set are deselected. So Radio Buttons are used to select among mutually exclusive alternatives and are always used in sets. They appear as a circle and when selected have a dot in the circle.

On the other hand, check boxes may be used singly or in a set, and when in a set several can be selected at the same time. Check boxes are a square and when selected show a check in box. You should think of these as a push button control for turning specific features on or off. The clickable area of the buttons is larger than at first appears since you can also click on the text accompanying the buttons in order to activate the button.

The event generated when the user interacts with these controls is not a click event as it is when the user interacts with a button, but a CheckChanged event. This is because when the user clicks on these controls, they intend to change the current status of the control. A problem occurs when a beginning programmer, or one new to VB, assumes that a click means the user is selecting (turning on) that option. It is actually just as likely that the user is deselecting or turning off that option.

Think about the operation of a Check Box compared to a Radio Buttons. Check boxes have to be deselected by the program user whereas Radio Buttons are automatically deselected for the user when they click on a different radio button.

So, does clicking turn the check on or does it turn the check off? Truthfully it can do either one. If the check is currently on then clicking it will turn the check off and vica versa. This is precisely the reason why the procedure is named CheckChanged. It is changing the check from its current state to the opposite state. Radio buttons and Check boxes are controls which alter the state of something in a program. Buttons are controls which activate an event procedure. If a programmer forgets that the Radio button and Check box event is CheckChanged, their coding will generate peculiar and unreliable results. Here is a program you can download which demonstrates this behaviour.

The most important effect of this, is that when we code using these controls, we must not assume that the user event is turning the state of the control on, rather it is changing the state of the control. It might be turning the control off. The easiest way to cope with this ambiguity when coding is to always use a Forced Choice selection structure. Explicitly check the state of the control by testing the Checked property of the control. Then provide one set of commands to be executed if the control is being selected, and another set of cammands to be executed if the control is being deselected. This way we can code the event to respond appropriately whether it is turned on or whether it is turned off. Typical code would look like this:

If EmailOptIn.Checked then
    optIn = True
    optIn = False
End If

This is better code - more reliable - than using just a conditional and incorrectly assuming that the user is always turning the control on. Making assumptions about the state of controls in programming always causes problems sooner or later.

Organizational Behaviour

Management Essentials

To manage a business a manager must control the outcomes of daily activities so that the goal of the business is achieved now and in the future. To most of you I am sure this probably sounds like a statement affirming the value of motherhood and apple pie. With all that has been written on management why another article? What can one more article add?

It is said that once we understand something, it can be described in just a paragraph or two. If this is true then we certainly do not yet understand management! Rather than paragraphs, we have many tomes written on the subject. The authors of these various books, while agreeing on many things, differ on many others. So the debate continues, but managers need practical answers today. They cannot wait until the topic is fully understood. They are responsible to act now, but while action is necessary, it is not by itself sufficient!

As one who holds both a bachelors and masters degrees in the subject, has practiced it for several years in organizations both large and small, and has taught it for over ten years at the post-secondary level, I can attest to the breadth of the topics encompassed by management. The breadth alone ensures that it would take several volumes just to introduce the subject. It would require a library to adequately cover the entire field of management, so this article can not be a definitive work on management.

So what is it? I will present certain ideas, to lay a foundation for a better understanding of the fundamentals of this subject. One cannot build a large edifice on a poor foundations for it will surely topple if we do. I do believe that we have adequate knowledge to properly manage any of the various organizations in our society today. However, I also believe that the breadth and depth of knowledge available to us today has obscured the issue of what is essential for managers to do. Because of this managers stumble, and they lose focus.

If the activities managers focus on do not move the business closer to their goal, then those activities, no matter how well meaning, are not contributing to the success of the business, rather they are contributing to its demise. If the actions are not contributing then the manager too is unfocussed. It is all about how a manger uses his time.

Mintzberg in his seminal study on How Managers Spend their Time commented as follows.

    "A manager's work is characterized by the brevity of individual tasks, the unrelenting pace of activity, and the understanding that their work is never done. In an organizations where time management is paramount, how managers use their time is critical!"

We all know that a manage's job is never done, but how they approach the task can be quite revealing. Most of us are familiar with organizations which demand that their managers spend many hours toiling to make the business successful. Most of us are also aware that some businesses require only an eight or nine hour day from their employees and then want them out of the office. In other words time is also obviously not sufficient for success.

The textbooks say 'to manage is to monitor and control a system so it yields the desired results'. This requires that we first identify and understand the system which is our organization. Second we must understand how to manage that system. That implies we must know how to change the system to produce desired results while preventing undesireable outcomes.

Of necessity we must also be clear as to the goal of the system. This is not a trivial matter as anyone will understand when they read the literature on goals and goal seeking. All too often managers seem to lose focus and even forget what the goal of an economic system must be. This also happens if the activities managers undertake moves us farther from the goal rather than nearer to the goal. Determining whther an action will move us closer to our goal before we take the action is not a trivial matter!

I would argue that many managers do not adequately understand the system they are supposed to control. They do not understand how to change their system so as to create intended outcomes without undesireable outcomes. Many do not even understand what their goal should be. This article will show you how to remedy these devastating yet essential components.

So how do we accomplish these things. It requires the mastery of a set of thinking processes for controlling systems. The three steps of the process are:

  1. What to change.
  2. What to change to.
  3. How to cause the change.
These three steps allow us to figure out what to do and how to do it without guesswork and without risk. We will go into more details as to exactly how this can be done later in this article.

Continued here

Desktop Publishing


In 1985 the introduction of an inexpensive laser printer (it sold for less than $5,000) and a software program from Aldus corporation called Pagemaker (cost about $1,000) triggered the creation of what today we call Desktop Publishing. Prior to the introduction of those two items, it was common to spend over $100,000 for computer hardware, software, image setters, and to hire a 'typesetter' or two and set up in business. By 1986 there were no more typesetters. Most of them had gone into business for themselves by buying a Macintosh computer, (Pagemaker only ran on Macintosh computers at the time) a laser printer and Pagemaker. Desktop Publishing allowed us to easily combine text and graphics on the same page, and anyone could do it!

The only advantage that typesetters had over a novice who bought the same equipment, was they knew what they were doing and how to do it quickly. The rest of us were on our own and what was produced by all those novices was thrilling, and at the same time rather chaotic. It took a few years for the novices to learn the rules that the typesetters knew well. Ironically the typesetters were in the best position to educate the rest of us, but by and large, they did not take up the gauntlet. The traditional way to learn the trade was to apprentice with an established typesetter and learn over time.

This is not an uncommon situation. When paradigms change it is the established people who have the first opportunity to take advantage of the changes. Often they are the last to see the inevitability of what is happening. So most of them resist such change, and it usually takes an outsider to see the real potential and act upon it. However this generalization is a story for another time.

One of the first people to provide instructions on how to get professional looking results with less time and effort was Robin Williams - the author and teacher not the commedian.

At this time a Maintosh computer could be purchased for about $2,000 to $3,000; the Laserwriter debuted at under $5,000, a real steal compared to other high quality printers at the time which could run as high as $100,000; and Pagemaker from Aldus Corporation weighed in at just under $1,000. For under $10,000 you were set up in the typesetting/publishing business. Just a year before a package of hardware and software to do the same thing had cost over $100,000. What an opportunity!

Of course, you could only actually do the first six steps of a traditional twenty-four step publishing process, but it was the most revolutionary advance since the introduction of the printing press by Johannes Gutenberg and others in the 1400's.