Visual Basic [VB] Programming Tutorials

Visual Basic or VB Programming Tutorials And Articles
  Title / Author Replies
Views
-
-
If you want to properly utilize VB.NET, it is very important to understand option statements. The following is a quick overview of the three option statements that are supported in VB.NET: Option Explicit: By default, Option Explicit is on for VB.NET projects. It's a good programming...
2
10,099
All comparison operators produce true or false results. In other words, the comparison is either true or the comparison is false. The mathematical operators produce numeric values, whereas the comparison operators produce only true or false values. The rest of the program can use the true or false...
6
13,458
When a List Box control has the focus, it will automatically scroll to the first item that begins with the letter you type. It will not, however, automatically select items based on more than the first letter. For example, if you type go, you may want the control to select the first item that...
6
21,189
You can also create functions in Visual Basic . They are just like Sub procedures except that they can return a value. You declare a function in much the same way as a Sub procedure, except that you use the Function keyword instead of Sub. Function Syntax Here's the formal syntax for...
1
105,296
A constant is a meaningful name that takes the place of a number or string that does not change. Constants store values that, as the name implies, remain the same throughout the execution of an application. You can greatly improve the readability of your code and make it easier to maintain by using...
1
37,987
Visual Basic allows a procedure to be repeated as many times as long as the processor could support. This is generally called looping . Visual Basic supports several versions of the Do statement. Do While loop The Do While loop is perhaps the most common looping statement that you'll put in...
2
71,969
One of the most reputable changes in the Visual Basic language is the introduction of structured exception handling in VB.NET. While the latest version of the language still supports the On Error Goto type of error handling, it's not preferred; instead, you should use structured exception handling....
1
10,634
Command buttons appear in almost every window of every Windows application. Command buttons determine when the user wants to do something such as exit the application or begin printing. In almost every case, you will perform these tasks to add a command button to an application: 1. Locate and...
1
119,899
While core functionality and useability of the application is always one of the most important aspects, various visual effects may improve the way users feel about a particular application. Even though you may be able to implement purely cosmetic features in an application, it's important to keep...
0
17,121
When a program makes use of the CD-ROM drive, it can be a nice touch to open and close the door under program control. The technique that allows you to do this relies on the mciSendString function from the Windows API. This function provides a general purpose interface to Windows' multimedia...
3
31,618
Put on form Picture Box control and button. Set property ScaleMode to 3-Pixel and post this code: Private Sub Command1_Click() Dim arr(1000, 1000) As Integer Dim i Dim y Dim iSumRed As Integer Dim iSumBlack As Integer iSumRed = 0
1
5,578
When dealing with dates in VB.NET, it's a good idea not to perform manual checks or calculations, which may be inaccurate depending on the quality of the code. Instead, it's advisable to rely on the functionality of classes provided by .NET. For instance, if you need to determine if a given...
2
18,959
While it has become common practice for developers to manipulate VB.NET date/time values manually, it's never a good idea because the result is rarely a correct date/time value. Whenever you try to use your own calculation routines for adding and subtracting date/time values, you risk generating a...
0
14,389
An important function of any program is the ability to work with a file system and manipulate files and directories. In this tip, we examine how to work with a file system using VB.NET. Lets see how to perform necessary functions with examples that utilise the existing classes, their methods, and...
0
40,720
In VB you can use the Kill statement to delete files quickly but you lose the ability to retrieve the files easily. We will see how to delete files to the Recycle Bin that can be recovered. You can use Visual Basic's Kill statement to delete files from a disk. You can also use the methods that...
0
9,172
Visual Basic was Object-Based, Visual Basic .NET is Object-Oriented, which means that it's a true Object-Oriented Programming Language. Visual Basic .NET supports all the key OOP features like Polymorphism, Inheritance, Abstraction and Encapsulation. Lets have a brief overview of OOP before...
2
13,847
A statement in Visual Basic is a complete instruction that can contain keywords, operators, variables, constants, and expressions. Following are the categories of statements Declaration Statements, Executable Statements, Assignment Statements Declaration Statements in Visual Basic You...
0
9,961
There are two types of procedures: Sub procedures and functions. In Visual Basic, Sub procedures do not return values when they terminate, but functions do.If you declare variables in your new procedures, those variables might not be accessible from outside the procedure, and that fact is new...
0
16,356
An object is a combination of code and data that can be treated as a unit. An object can be a piece of an application, like a control or a form. An entire application can also be an object. Objects are things that you can program with, things that make programming easier. They contain a set of...
0
12,078