VB6 Tutorial 03: Controls Overview

Posted On 2018-03-21 by VB6Boy
Keywords: visual,basic,vb6,visualbasic,tutorial,basic,beginner,controls,overview
Tags: VB6 Tutorials Windows
Views: 56


Looking for the more of the VB6 Tutorial? Here is the tutorial index.

Before getting into the actual programming work, you need to have a knowledge of VB controls. In this lesson, a very short description has been given about the controls.

In later chapters, you will learn about the VB controls in some detail.

Below is a picture of the VB6 Controls Toolbox. Following that, description of each of the controls is given.

controls toolbox

Label

The label control is used to display text. It is also used to label other controls. The end user cannot edit the label text.

TextBox

The TextBox control contains characters. End-users can edit the characters contained in the TextBox.

CommandButton

The CommandButton control is simply a button that we see in our daily-use software. When the end-user clicks the CommandButton, the program behaves according to the code written for the CommonButton.

Option Button

Option Button is also known as radio button. This control enables the end-user to select one among several options. Only one option button among others in a group can be on at the same time. You can name an option using the Caption property.

CheckBox

The CheckBox control is used to make a yes/no or true-false selection. You can check more than one CheckBox at the same time that lets you make multiple choices. You can give label to this control using the Caption property.

VscrollBar & HscrollBar

VscrollBar and HscrollBar controls let you create Vertical scroll bar and Horizontal scroll bar respectively.

Frame

The Frame control is used as a container of other controls. This is also used to group different controls especially in Option Button controls when you wish to select more than one option. The Caption property associated with it is useful to name the frame.

PictureBox & Image

These controls are used to display images (e.g company logo). The supported picture formats are BMP, DIB (bitmap), ICO (icon), CUR (cursor), WMF (metafile), EMF (enhanced metafile), GIF, and JPEG. But PNG format is not supported.

ListBox & ComboBox

The ListBox control contains a number of items. The user can select one or more items from the list.

The comboBox control has the feature of ListBox and TextBox. This control does not support multiple selections.

QuickHint:

ComboBoxes and ListBoxes can have their data loaded from any source, such as a text file, a database, or even on-the-fly.

DriveListBox, DirListBox & FileListBox

These controls are often used together to perform file related tasks like opening or selecting files that are stored in the secondary memory.

Timer

The Timer control is not visible on the form when you run the program. It is used to execute lines of code repeatedly at specific intervals.

Shape & Line

These controls do not raise events. Shape and Line are used to draw line, rectangle, circle etc on the form.

The Data Control

The Data control is used for database programming.

OLE(Object Linking & Embedding)

You can connect other programs to your application provided with a window.

There are also many other controls other than these. The other controls are discussed in the appropriate chapters. You can also add external ActiveX controls that will enhance the interface and functionality of your program.

Looking for the more of the VB6 Tutorial? Here is the tutorial index.


About the Author

VB6Boy has posted a total of 71 articles.


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:23.20.165.182

Before you can post, you need to prove you are human. If you log in, this test goes away.




Code Links