Programming Language Features of Visual Basic 6.0

Visual Basic is not only a programming language, but also a complete graphical development environment. This environment allows users with little programming experience to quickly develop useful Microsoft Windows applications which have the ability to use OLE ( Object Linking and Embedding ) objects, such as an Excel spreadsheet.

objects and tools used by Visual Basic. The main object in Visual Basic is called a form. When you open a new project, you will start with a clear form that looks similar to this :






To this form you add controls. Controls are things like text boxes, check boxes and command buttons. Controls are added to your form by choosing them from the Visual Basic “tool box” with the mouse and inserting them in the form. Yours may look different, but the basic Visual Basic Tool Box looks like this :












you can select the control like Label and drop it on the form.








Once forms/controls are created, you can change the properties ( appearance, structure etc. ) related to those objects in that particular objects properties window. From this window, you choose the property you want to change from the list and change its corresponding setting. Here is an example of a properties window








Once the code box is open, you select the object to create an event for and the triggering action ( such as a certain mouse action ) from the drop down menus in the code box. You can open a code box for a particular form by choosing it from the project window and selecting the View Code button.Code must be written to create an event. You can do this in Visual Basic’s code window. Yours will look similar to this ( except of course, the body of the sub-procedure where the actions are specified) :







Once all your objects are created, you can combine them to form a single executable program that can be run outside of the Visual Basic environment, in Microsoft Windows

For output press f5 key








when an event is fire,like you click on the form then cption of the Label1 and Label2 is change as you written in code window.For example

Comments are closed.