Visual Basic [VB] Programming Tutorials

Visual Basic or VB Programming Tutorials And Articles
  Title / Author Replies Reverse Sort Order
Views
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
74,404
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
15,440
The controls you select for your application's form are important because the controls (also called tools) provide the application interface for your users. Users interact with your application by clicking the controls and entering text in the controls. Placing and sizing controls are perhaps the...
2
11,419
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
19,815
Temp files are generally used for temporary storage and data manipulation. This is often necessary for storing user data, user preferences, session information, application cache, and many other types of information. In order to get the name of the file that you can use as a temp file in...
2
32,310
This is a new class written by me to extract the icon assigned to a file in your current system. Ex: Get the icon you see for mp3 files when you open your music folder. Many at first think this is just a WIN API wrapper for the SHGetfileinfo function. NOPE, that method would just grab the icon...
2
6,710
Visual Basic 6 provides a function called Environ through which you can get all the environment variables available. It takes string parameter which is name of the Environment variable and returns its value. The Valid Environment strings are ALLUSERSPROFILE APPDATA CI_HOLOS_CLI...
1
86,342
A class is a part of the program that defines the properties, methods and events of one or more object that will be created during execution. An object is an entity created at run time, which requires memory and some resources and is then destroyed when it's no longer needed or when the application...
1
9,142
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
107,277
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
40,203
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
11,104
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
123,194
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,985
Working with the DataGridView control is easy in Visual Basic.NET. The useful features of this control makes database software development a breeze. The ready-made features such as the properties, methods, functions and events do most of the tasks. What is DataGridView? This is a control in...
1
4,975
Here's a cool, handy macro that will auto-generate a Table of Contents for any Excel file. Steps remains the same as in any macro (Alt F11 to start VBA, Insert module, paste the code, save, File -> Return to Excel, then Alt F8, and Run). That's a mouthful, but you know what to do. Sub...
0
14,217
Windows stores some important information (e.g., computer name and user name) in the environment variables. The ability to access these variables to retrieve their values comes in handy in many applications. In this tip, I look at how you can use VB.NET to retrieve the information from the...
0
16,723
-
-
Whenever need to know the number of words in a larger VB.NET string consider using the Split function. In this example of how to use Split, as well as Replace if you have more than one space between words. Working with strings and performing various string operations is important to any Visual...
0
14,653
Developers often deal with various date calculations in applications. If you need a simple way to figure out how many days there are between two given dates, consider using VB.NET's TimeSpan object. Snippet A shows how you can use the TimeSpan object to obtain the elapsed amount of time...
0
97,297
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
41,487