by Dinesh Thakur Category: Basic Of Visual Basic

Visual Project consist of at least two, and usually more, files as follows:

 .vbp file: This file is called the project file, is a small text file that holds the names of the other files in the project, as well as some information about the VB environment.



 
by Dinesh Thakur Category: Basic Of Visual Basic

Visual Basic has three distinct modes. While you are designing the user interface and writing code, you are in design time. When you are testing and running project, you are in run time. If you get an error or pause project execution, you are in break time.

 
by Dinesh Thakur Category: Basic Of Visual Basic

Every control has it’s properties one of the common properties of controls is name property. Name property is the one by which the control is identified and it is referred as the object name of that control.

 
by Dinesh Thakur Category: Basic Of Visual Basic

Caption property of the Label control determines what will appear on the Label control.  This Caption property is changed at run time or design time.  Use can not change the Caption property of the Label control.

 
by Dinesh Thakur Category: Basic Of Visual Basic

Command button has a Caption property which is used to display a text on the top of Command Button.

 
by Dinesh Thakur Category: Basic Of Visual Basic

Visual Basic is event driven programming language. Over here cmdPush_Click() is a event procedure, which belongs to cmdPush command button object.

 
by Dinesh Thakur Category: Basic Of Visual Basic

While your project is running, the user can do many things, such as move mouse around; click on either button; move, resize or close your form’s window; or jump to another application. Each action by the user causes an event to occur in your Visual Basic Project.

 
by Dinesh Thakur Category: Basic Of Visual Basic

Visual Basic convert your project to machine language, it finds any compile errors. You get compile errors when you break the syntax rules of Basic and sometimes when use an illegal object or property.

 
by Dinesh Thakur Category: Basic Of Visual Basic

If you are a windows use,you probably appreciate and rely on ToolTips,those small labels that pop up when you pause your pointer over a toolbar button or control.You can easily add ToolTips to your projects by setting the ToolTip Text property of any control that you want to display a ToolTip.

 
by Dinesh Thakur Category: Variables and Constants

A Variable’s Scope : The scope of a variable is the section of the application that can see and manipulate the variable. If a variable is declared within a procedure, only the code in the specific procedure has access to that variable. When the variable’s scope is limited to a procedure it’s called local.

 
by Dinesh Thakur Category: Variables and Constants

Some variables don’t change value during the execution of program. These are constants that appear many times in your code. The constants are preferred for two reasons :

 
by Dinesh Thakur Category: Variables and Constants

Variables are used to store values during a program’s execution. So, variables are place values in which you can leave values and recall them at will.

 
by Dinesh Thakur Category: Variables and Constants

1. There are several ways of declaring the variable, the most commonly used statement is Dim statement to declare the variable. The syntax for declaring the variable using Dim is as follows:

 
by Dinesh Thakur Category: Variables and Constants

1. Visual Basic provides number of built in functions. The Val function is one of it. Val function converts the text data into a numeric value.

 
by Dinesh Thakur Category: Variables and Constants

1. The order in which operator are performed determines the result. Consider the expressions 3 + 4 * 2. Over here if addition is done first, the result is 14. However, if multiplication is done first then result is 11.

 
by Dinesh Thakur Category: Variables and Constants

In Visual Basic there are some controls properties that return you a Boolean value which can be as condition in the testing. For example, option buttons returns true when they are selected and returns you false when they are not.

 
by Dinesh Thakur Category: Variables and Constants

Relational operators: Relational operators are used for comparison of to variables of same data type. These operators are used in the conditions where two values are compared and true or false is returned according to test result.



 
by Dinesh Thakur Category: Variables and Constants

1. A power full asset of the computer is its ability to make decisions and to take alternate course of action based on the out come.



 
by Dinesh Thakur Category: Variables and Constants

When a Basic statement become too long for one line , use a line-Continuation

character.You can type a space and an underscore , press Enter, and continue the statement on the next line . It is OK to indent the continued lines.The only restriction is that the line-continuation character must appear between elements; you cannot place a continuation in the middle of a literal or split the name of an object or property.

 
by Dinesh Thakur Category: Decisions and Conditions

Loop statements allow you to execute one or more lines of code repetitively. Visual Basic supports the following loop statements:

 

Page 1 of 5



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.