Wednesday, January 23, 2008

Lesson 4-Working With Controls

Before writing an event procedure for a control to response to a user's action, you have to set certain properties for the control to determine its appearance and how it will work with the event procedure. You can set the properties of the controls in the properties windows. I am not going into the details on how to set the properties. However, I would like to stress a few important points about setting up the properties.





* You should set the Caption Property of a control clearly so that a user know what to do with that command. For example, in the calculator program, all the captions of the command buttons such as +, - , MC ,MR are commonly found in an ordinary calculator, a user should have no problem in manipulating the buttons.
* You should set a meaningful name for the Name Property because it is easier for you to write and read the event procedure and easier to debug your program later.
* Another property that is important is whether you want your control to be visible or not at start up.This property can only set to be true or false.
* One more important property is whether the control is enabled or not.

No comments: