Visual Basic [VB] Programming Tutorials

Visual Basic or VB Programming Tutorials And Articles
  Title / Author Reverse Sort Order Replies
Views
Sometimes you might require to get a list of all the files in a folder, I was thinking how it can be implemented, the solution is to used the WSH interface and write a script in VBScript. Below is a sample script which will get the list of files on a directory, say c:\windows and save it to the...
32
452,118
Often in your code procedures, you may need to determine what typeof control your code has accessed. For instance, you may want to alter the text on every command button on a form. Or you may want to change the properties for several different controls. In such instances, you have several ways to...
0
12,734
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,409
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,469
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
96,787
Working with strings is a very important functionality in most applications. Your ability to effectively use the existing .NET functionality is vital for building solid applications. String.Compare method VB.NET's String.Compare method is handy when you need to compare two string...
0
28,110
Developers are often required to make a specific action take place on a form on a regular basis or after a set time interval. One way you can achieve this functionality is by using VB.NET's Timer control. Example One of the best ways to understand how the Timer control works is with an...
0
12,387
Uniform Resource Identifiers (URIs) may represent Web requests, FTP requests, files, news, and e-mail. Whenever you need to work with URIs and determine a particular portion of a given URI, you can utilize the System.URI class available in Visual Studio .NET. This class allows you to represent and...
0
6,004
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,427
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,300
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,805
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,541
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
31,928
Introduction This solution is to prevent the conversion of large numeric values in scientific notation while exporting to excel. Background This solution deals with the situation when there is a large numeric value, and while exporting to excel it gets converted to scientific notation....
3
7,381
A variable is temporary storage space for numbers, text, and objects. Variables are constantly being created and destroyed and will not hold any values after your program has ended. If you want to save the values of variables or other data. Before allocating storage space for a variable, decide...
11
121,588
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
13,362
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
39,641
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
73,782
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
10,491
Introduction A subroutine is a container that holds a series of VBScript statements. Suppose you'd like to create a block of code that accomplishes some specific task. Maybe you need to accomplish that task in various places throughout your code. All you need to do is create, or declare, the...
3
98,290