Visual Basic Tutorials



This Tutorial is for completely beginners with Visual Basic. It will teach you right from the very start, how to make your first program in Visual Basic.

This tutorial is based around Visual Basic 6.0, but changes in VB.Net are highlighted where applicable. Visual Basic makes it easy to create simple or complex Windows programs, through a range of different project types.

Visual Basic falls into a category of programming referred to as event-driven programming. Event-driven programs respond to events from the computer, such as the mouse button being pressed. The designer uses ready-made objects such as Command Buttons and TextBoxes, to build user interfaces that make up the application. This approach to programming drastically reduces the amount of code required to develop a Windows application.

We offers free tutorials on visual basic 6 source code and help with visual basic programming. Get the latest tips, code, and tutorials and today's hottest programming language.

This website is for programmers and would-be programmers who want to learn visual basic as quickly as possible, You will be quickly creating applications by following the simple examples. All the applications featured are fully functional windows applications with all the usual user-interface controls such as command buttons, labels and textboxes.

As long as you are familiar with Windows 95, you can easily create applications with Visual Basic. You don't have to be a windows expert, but you should feel comfortable working with menus, the mouse and the windows interface. If you've opened, closed and re-sized windows you should have the ability to make your own Visual Basic applications in no time at all.


A Computer cannot understand any persons spoken language such as English , French is simply too general and ambiguous for computers to understand. Therefore, we must adapt to the machine and learn the computer language so that the computer can understand. This is where visual basic comes into picture.

When you type visual basic source code into the computer, the computer processes these statements into Visual Basic language. The statements in visual basic, however, it has multiple meanings within the same context.


Graphical User Interface (GUI) Components

The properties describe the appearance of the GUI component. When adding a component, the Name property should be set immediately, according to the three-letter mixed naming conventions. The properties are displayed in the Properties Window in Name/Value pairs in alphabetical order.


Most programs require the temporary storage of data. The data is stored in a variable, which is a temporary storage in the computer's memory. The variable name is the "identifier", used to identify the data.

Program Flow

Structured programming is based around three basic constructs:
1. Sequence

The Sequence construct is the simplest, whereby statements are executed in the order they're found in the code.


An event occurs in response to an action, such as the user clicking the mouse or pressing a key in the application. An event handler is a routine that responds to the event.


As well as the shape control, there are three Methods that can be used for producing graphics in Visual Basic.
1. PSet,
2. Line
3. Circle.
These methods can be used on a Form, PictureBox, or Printer object.

Working with Strings

Left, Right and Mid are three Visual Basic functions to locate sections of a string. All of the following examples use the string "strExample" with the following value.

Working with Dates and Times

The basic data type Date is used in Visual Basic to store the date and time. Date literals are enclosed within the # operator.

Drag and Drop

Setting the DragMode Property of a control to "Automatic", allows a control to be dragged. For an action to be performed, a corresponding DragDrop Event will need to exist.
For example, to reposition the control on a different part of the Form, the Form would require a DragDrop event.

Procedures and Functions

Procedures and functions provide a means of producing structured programs. Rather than repeating the same operations at several different places in the program, they can be placed in a procedure or function.

Debugging and Error Handling

Visual Basic has built in Error Scanning to check for syntax errors. For example, if you forget to put the "Then" keyword at the end of an If statement, you get an error message saying, "Expected: Then or GoTo".

File Handling and the FSO Object

The File System Object (FSO) enables you to manipulate the files, folders and drives as well as read and write to sequential files.

Regular Expression Object

Regular expressions are used to match patterns of text, enabling you to manipulate text easily. The regular expression object in VBScript is called RegExp, and has three properties, and three methods.

Common Dialog Control

The Common Dialog Control provides a standard interface for operations such as opening, saving, and printing files or selecting colours and fonts using the Microsoft Windows dynamic link library COMMDLG.DLL.

Database Connectivity

To use ADO, you must set the appropriate references by selecting, Project, References, and making sure there's a tick against Microsoft ActiveX Data Object Library.

Classes and Object Oriented Programming

Instead of breaking down a problem into smaller chunks as with procedural programming techniques, object-oriented programming is achieved by viewing the problem as a collection real-life Objects.

ActiveX Components

An ActiveX Component may either be an ActiveX EXE, ActiveX DLL or an ActiveX Control.

Creating a COM Object

The Component Object Model (COM) is a Microsoft framework for managing component objects, allowing them to communicate by calling methods of other components in their object workspace.

TCP/IP Network Programming

Network programming is based around the Winsock control. To use the Winsock Control, add it to the ToolBox by selecting the "Components" menu item and select "Microsoft Winsock Control 6.0" from the list.

Internet Programming (HTTP and FTP)

The WebBrowser control provides the functionality of Internet Explorer through point and click hyperlinks.

The Windows API

The Windows Application Programming Interface (API) is a set of Windows functions that can be incorporated in your program.

Using XML

The Extensible Markup Language (XML) is perfect for data sharing requirements in an application.

Using Treeview Control

The Treeview Control holds a collection of nodes so to add a node to the Tree you need to define a new node and then add that node to the Treeview's collection.



If you don't find what you are looking for. Please click here to submit your query, our experts will reply soon.



E-mail :
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641