"How to do it" Programming Techniques for Visual Basic .NET
You will find problem solving articles here that walk you through the new ways of programming VB.NET. Make better use of the .NET Framework and the growing world of .NET objects.
Sign Up for Our Free Newsletters
Thanks, You're in!
Visual Basic Categories
- "How to do it" Programming Techniques for Visual Basic .NET
- Learn VB.NET - Visual Basic for the New Millennium
- Find the Visual Basic Book You Need
- ASP.NET with Visual Basic Hub Site
- Quick Tips for VB Programmers
- Program Microsoft Office Applications
- Framework Tools for .NET
- Threading and Multiprocessing
1 Subcategories in Solutions to Visual Basic .NET programming problems with illustrations, descriptions and examples.
203 Articles in: Solutions to Visual Basic .NET programming problems with illustrations, descriptions and examples.
Create Random Arrays of Unique Integers
A random array of unique integers is a requirement for most card games and for many other applications as well. This program shows you two ways to create a random array of unique integers, and also shows how they perform with graphical results using the StopWatch object. Another method using collections and a Lambda expression can be found in a followup article linked in this one.Visual Basic, Visual Studio, ADO.NET, and SQL Server
The first four articles in this series designed to help beginners understand how to use SQL Server databases with Visual Basic .NET explain the steps to write simple programs. But since these steps are part of a much larger technology picture, this article brings the relationship of what we have do so far into focus in that picture.Using Data Sources - VB.NET Database Course
The eighth article in the beginning database series for VB.NET programmers shows how to refine your use of data sources to create a VB.NET database application that works the way you want it to work. This example uses a Data Source to create the many-to-many result from the database in a Windows Forms application.Coding a Menu in WPF
Menus are central to most user interfaces these days, so there has to be a way of coding them in WPF and XAML. But since Menus are also a composite kind of thing, there are always a few unique methods involved in creating them. In this example, we use a WPF "User Control" to create the menu so it's a good example of that as well.Using Meta 'CHARSET' Tags for Character Encoding (HTML5)
HTML5 made a bunch of changes to make things easier for web designers building web pages, and the meta charset tag is no different. This is a case where the browsers were already supporting it, so HTML5 made it valid in the specification. Learn more about character encoding and the meta charset tag in HTML5.Everything You Need to Get Started with WPF and XAML in Visual Basic
WPF and XAML - Windows Presentation Foundation - and XAML - Extensible Application Markup Language - are an entirely new way to create application interfaces that were introduced with Windows Vista and Framework 3.0. Most references approach the subject from the XAML and WPF point of view. Here's one written for the Visual Basic programmer that starts at the beginning.How to Use the New Application Settings in VB.NET
VB.NET gives you a great new way to save application settings like connection strings or size and color by application or by user. The methods used in VB.NET are different than the ones in VB.NET 1.1 and other .NET languages such as C#. But technical articles I have read and even on Microsoft's own pages make mistakes. The goal of this article is to clear up as much confusion as possible, but some remaining problems are documented in it as well.Using Extension Methods in VB.NET
A normal class has to be instantiated as an object before the methods in it can be used. But if a method is shared, then the class it's in doesn't have to be instantiated and the method can be used directly. What if you need both? Then you need a feature introduced in VB.NET 2008 called extension methods. This article tells you how that works.Using VB.NET To Code The VB6 ItemData Property
ItemData is one of the many features of VB6 that was dropped in the move to VB.NET. It wasn't as popular as the VB6 Control Array feature, but a lot of people liked it. Peter wrote in to ask how to do the same thing in VB.NET. The answer has a lot more to do with Classes, Structures, and Object Oriented Programming than ItemData. This article explains what that means.Attributes in VB.NET - Part One
Attributes store information about an assembly, a class, a method and many other entities in the Visual Basic assembly metadata. This article explains how it works. It's also part one of a two part article where part two shows you how to embed a private key in the metadata so you can send the entire thing to someone and have a reply securely returned.LINQ to SQL in VB.NET
One way to classify the innovations introduced with LINQ - Language INtegrated Query - is by all of the datastores supported by Microsoft. One of the first datastores people want to use is SQL where the datastore is a SQL Server database. This article shows how to get started using database code that is a compiled part of your VB.NET program.Overview of Partial Classes in Visual Basic .NET
Partial Classes were introduced with VB.NET 2005 (Framework 2.0) and are used in a lot of different ways in VB.NET, including ASP.NET and Windows Forms. This article explains what they are and why they're useful, including how to hide them in Visual Studio Solution Explorer. Tested in both VB 2005 and VB 2008.How to 'Dispose' Objects in Visual Basic
Disposing an object is something that you won't have to worry about in VB.NET very often. .NET includes a technology called Garbage Collection that usually takes care of everything silently and efficiently. But occasionally, usually when using file streams, sql objects or graphics (GDI+) objects, you may need to take control of disposing objects in your own code. Or, you might write your own class that implements the IDisposable interface. This article gives you some useful advice..NET - COM Interoperability in Visual Basic
There are still plenty of reasons to use COM, the Component Object Model architecture that was the heart of Microsoft's technology back in VB6 days. This is the second article in a series. The first walks through a program that updates an Excel 2007 spreadsheet using Visual Basic .NET 2008 Express. This article shows how to go the other way and access a .NET Linq object from a VB6 program.Want to Include a File in Your Actual Project Assembly?
VB.NET resource files allow you to make objects like graphic files, strings, and icons available to your code and be included as part of the project. A resource file is integrated directly into your Visual Basic project for maximum execution speed and minimum hassle packaging and deploying your application. This article tells just how to use them in VB.NET.Using TableLayoutPanel and FlowLayoutPanel in VB.NET Windows Programming
The ability to design your application interface was given a huge boost when Microsoft intoduced the two new controls TableLayoutPanel and FlowLayoutPanel in Framework 2.0. Using these controls, you can create forms where the other controls, like Textbox and Listbox, stay right where you want them to be. And you can even get autosizing effects that were previously only available with third party purchased controls. This article shows you how to get the most from these controls.Use a database instead of a sequential file
A lot of programmers still use a sequential file when they need to save and retrieve data in a Visual Basic program. There are a lot of better alternatives, however. Free programming tools from Microsoft make it easy to use a database rather than a sequential file. And the new SQL Server Compact 3.5 database files make it even easier. This article shows you how it's done.All About Serializing in Visual Basic
If you need to save everything in a class, structure, or collection for use later on, then serialization is the way to go. In addition to straight-on serialization to a file, this article also shows you how to implement custom serialization where the serializing class does custom processing while it's serializing.Understand and Program Checksums with Visual Basic
Checksum is a method or finding, and sometimes fixing, errors in files, message packets, strings, or any set of bits that has to be accurate. It's used most often in data communications where getting a bit scrambled here and there happens a lot. In my survey of all that is out there for you to read about it, it seemed to me that what was missing was a basic explanation of what a checksum actually is. That's what this article is all about.Special Directories and System Directories in VB.NET
.NET, and in particular, Visual Basic, provide extra help for discovering information about Special Directories in the (exclusive to VB.NET) My namespace. But not everything you might want to know about is there. This article shows you what's missing, and how to find that using the Environment namespace.Introduction to WPF & XAML for Visual Basic Programmers
An introduction for VB programmers to WPF - Windows Presentation Foundation - and XAML - Extensible Application Markup Language - can be found in part 1 of this series. The XAML code is hooked up to a VB.NET code file using the new WPF routed events model in this tutorial. If you need help understanding the WPF concepts of events bubbling up or tunneling down, this article explains it.A Programmer's Guide 'WPF' 2D Graphics in Visual Basic
For many years, GDI+ has been the graphic foundation of Microsoft technology. Today, there's a new technology, WPF - Windows Presentation Foundation. WPF is usually thought of as a replacement for Windows Forms, but there's actually a powerful graphics part of it that also replaces GDI+. This article explains it.WPF Tutorial Part 6: A First Introduction to WPF and XAML for Visual Basic
An introduction for VB programmers to WPF - Windows Presentation Foundation - and XAML - Extensible Application Markup Language - can be found in part 1 of this series. WPF requires a fundamental understanding of multithreading. Part 6 of the series introduces the important concept of multithreading by showing how to solve the problem of the error message, "The calling thread cannot access this object because a different thread owns it."WPF Tutorial Part 3: A First Introduction to WPF and XAML for Visual Basic
An introduction for VB programmers to WPF - Windows Presentation Foundation - and XAML - Extensible Application Markup Language - can be found in part I of this series. A WPF application coded entirely in XAML is developed in this part of the series.How to Print in VB.NET
VB.NET has direct and easy to use support for printing. This short article explains how it's done uisng the System.Drawing.Printing namespace. In addition, if you run into an InvalidPrinterException in Windows XP or an AccessViolationException in Vista, you might want to see how I got around it here.Getting Really Random - RNGCryptoServiceProvider
Microsoft provides good support for random numbers in Visual Basic .NET. The problem, as in so many other things, is in understanding the documentation they provide. This article interprets their pages and consolidates all the common ways of creating random numbers into one article for you.Namespaces in VB.NET
Namespaces keep Visual Basic .NET organized. .NET by itself is huge and the names of individual software objects frequently overlap. Add in the code that all of the .NET programmers write and you have a giant pot of names that would be chaos if there wasn't a way to organize it and keep one software object from interfering with another. The way it's done is namespaces. This article explains what they are and how to use them.How to use random numbers in Visual Basic .NET programs
Microsoft provides good support for random numbers in Visual Basic .NET. The problem, as in so many other things, is in understanding the documentation they provide. This article interprets their pages and consolidates all the common ways of creating random numbers into one article for you.Namespaces in VB.NET
Namespaces keep Visual Basic .NET organized. .NET by itself is huge and the names of individual software objects frequently overlap. Add in the code that all of the .NET programmers write and you have a giant pot of names that would be chaos if there wasn't a way to organize it and keep one software object from interfering with another. The way it's done is namespaces. This article explains what they are and how to use them.IEnumerable and IEnumerator Explained in Language You Understand
IEnumerable and IEnumerator are frequently tossed into technical articles these days. That's because this technique forms a core element of .NET technology. Unfortunately, the articles don't say a thing about what they do. This article, written in the 'from the ground up' style, fills in that missing explanation.Learning to use structures by coding one for complex numbers
A structure in Visual Basic .NET can be used a lot like a class. This article includes code from Tim Patrick's Visual Basic Cookbook as an excellent guide to the understanding how to code and use structures as well as how to overload operators and even some example string manipulation code.Part 2: A First Introduction to WPF and XAML for Visual Basic Programmmers
An introduction for VB programmers to WPF - Windows Presentation Foundation - and XAML - Extensible Application Markup Language - can be found in part I of this two part article. In this part, the key concept of XAML namespaces is explained.A Two Form Example Program
A reader asked for help adding a month to the date entered into a TextBox. But the answer I came up with involved using Select Case to control RadioButton processing, using the DateTimePicker component, and something new about the difference between Show and ShowDialog. It was a good example to show how to raise a custom event too. This article explains the details.A First Introduction to WPF for Visual Basic Programmmers
WPF and XAML - Windows Presentation Foundation - and XAML - Extensible Application Markup Language - are an entirely new way to create application interfaces that were introduced with Windows Vista and Framework 3.0. Most references approach the subject from the XAML and WPF point of view. Here's one written for the Visual Basic programmer that starts at the beginning.An Example Program for String Processing
This article has two goals. First, to Illustrate programming techniques like OpenfileDialog and SaveFileDialog, the new .NET StringBuilder object, and how to use RegEx (Regular Expressions). The second goal is to provide a handy file scanning utility to display text strings inside any file.Simple File Processing and VB.NET
There are a lot of ways to process simple files in VB.NET. The problem is that there are too many, and most references drown you with detail about all of the features of just one specific way. This article takes a different approach. All of the ways to do simple file processing are presented at a summary level so you can see what's available and take your pick. The methods presented range from legacy objects like LineInput to serialization, TextFieldParser, and LINQ to XML.The IComparable Interface: An Intro Using a Custom Sort
.NET introduced some serious improvements for timing things with the new StopWatch object and improvements in dates and times. But how all this works together, and in relation to each other is one of those dark, musty corners of .NET. This article clears out some of the cobwebs.A BCD Clock Program
BCD is an acronym for Binary Coded Decimal. A BCD clock shows the time as a series of six columns where each column is a binary number. When the each binary number is converted into a decimal digit, it tells you the time. This short article shows how to write a VB.NET program to do the same thing.Compiling Regular Expressions
Regular Expressions are a language that stands by itself. You can use essentially the same regular expressions in a lot of different languages including VB.NET. That's "essentially" because they're not exactly the same. The only comparable language is SQL since most languages have a way of using an essentially similar version. VB.NET, however, goes one step further and allows you to compile a RegEx. This article explains how to do it.Chars and Codes - All About Encoding
Encoding is the way characters, such as 'A' and '123', but also including symbols and characters from all languages, are saved in Visual Basic and in other languages. Encoding isn't strictly a Visual Basic technology. It's one that allows VB to work with the same data used by any other language. This article explains more.RichTextBox - Selecting, Deleting, and Moving Lines
The RichTextBox is more than just a TextBox with more properties and methods. It's a different way of using text. That's because the Rich Text standard is much more than just text. This article explains rich text and how to solve a reader's question using a RichTextBox component.StringBuilder ... A New Object in .NET
StringBuilder solves a problem of efficient code that Visual Basic 6 used to have. This article shows you what StringBuilder is, how to use it, and how much faster it really is. If you need help using StopWatch or TimeSpan, there's a good example of that code here too.Bug Reporting to Microsoft - A Continuing Story
While writing an article for the About Visual Basic page, I ran into what seems to me to be a very clear-cut bug in Visual Studio. Since Visual Studio is a pretty good product, I hadn't encountered a bug as definite and clear as this one before, so I figured out how to report it to Microsoft. This article tells what happened after that.Create Your Own Custom Form Object
Using Inherited Forms and the Inheritance Picker in VB.NET is a great way to increase your productivity if you need several forms in your project that are similar, but not quite the same. This example also shows you how to override event code for components, like buttons or text boxes in the inherited form.Templates for New Projects and New Items
You can add your own custom project templates and new item templates into Visual Studio. If there are local standards, special requirements, or just programming styles that you like to use, you can start out with part of your work already done by creating a custom template. This article shows you how.Coding New Instances of Objects
The concept of an object "instance" is a key part of OOP. But coding a new object instance has several optional variations. Some options make a difference in what you code does but others don't even matter. This article sorts through all the options and explains how the VB.NET New keyword works.VB.NET, SetEnvironmentVariable, and the Windows API
In VB 6, it was common to be required to use Windows API calls to get things done. In VB.NET, it doesn't happen very often, and, quite frankly, it's a lot harder to do. Before .NET 2.0, using SetEnvironmentVariable was one one of the times when a Win API call was necessary. This article shows you how to call this API in Windows.GDI+ Graphics in Visual Basic 2005 .NET
GDI+ is the way to draw shapes, fonts, images or generally anything graphic in Visual Basic 2005 .NET. This is Part 9 of a complete introduction for programmers. This part explains Metafiles. These are files that describe a sequence of graphics operations that can be recorded (constructed) and played back (displayed).GDI+ Graphics in Visual Basic 2005 .NET
GDI+ is the way to draw shapes, fonts, images or generally anything graphic in Visual Basic 2005 .NET. This is Part 8 of a complete introduction for programmers. Graphics using images are explained in this segment, including bitmap images, thumbnails, and icons.GDI+ Graphics in Visual Basic 2005 .NET
GDI+ is the way to draw shapes, fonts, images or generally anything graphic in Visual Basic 2005 .NET. This is part 7 of a complete introduction for programmers. The final discussion of the vector graphics is here. The use of color and transparency is also discussed.GDI+ Graphics in Visual Basic 2005 .NET
GDI+ is the way to draw shapes, fonts, images or generally anything graphic in Visual Basic 2005 .NET. This article is part 6 of a complete introduction for programmers. This article goes beyond simple shapes and shows how to create shapes from sets of points and combinations of other shapes using the GraphicsPath object. We also show how to use that object as a clipping region to control what parts are drawn.GDI+ Graphics in Visual Basic 2005 .NET
GDI+ is the way to draw shapes, fonts, images or generally anything graphic in Visual Basic 2005 .NET. This article is part 5 of a complete introduction for programmers. In this article, the concept of a coordinate space is explained and graphic transformations using the Matrix object is demonstrated.GDI+ Graphics in Visual Basic 2005 .NET
GDI+ is the way to draw shapes, fonts, images or generally anything graphic in Visual Basic 2005 .NET. This article is part 4 of a complete introduction for programmers. In this article, blending colors and merging an image with a vector graphic are explored with an example of a shape using color blending and overlaid images that can be varied according to a value in a variable. The result is a temperature guage that varies from blue to red and is overlaid with different transparent GIF images.GDI+ Graphics in Visual Basic 2005 .NET
GDI+ is the way to draw shapes, fonts, images or generally anything graphic in Visual Basic 2005 .NET. This article is part 3 of a complete introduction for programmers. In this article, we continue the study of vector graphics and we introduce bit mapped graphics with a different way to display a an image by filling a very thick line with the image using one of the brush objects.GDI+ Graphics in Visual Basic 2005 .NET
GDI+ is the way to draw shapes, fonts, images or generally anything graphic in Visual Basic 2005 .NET. This article is part 2 of a complete introduction for programmers. In this article, "vector graphics" - drawing lines and shapes - is discussed. The standard sine, cosine, and tangent trigonometric functions are graphed as an example.When Form.Load isn't enough
Most Windows applications use Form.Load for initialization code, such as setting the starting value of variables or perhaps downloading starting values from a database. But what if your program needs more control? You might want to put all of your intialization code in a different module for security reasons, for example. This article shows you how to code your own Main routine which can then turn control over to a startup form ... or code something else.How to return from a VB.NET Dialog
Dialogs in VB.NET use object oriented properties and methods, rather than the previous idea used in COM of returning a value, to tell the calling program what happened in the dialog. Like everything else in .NET, this may require an adjustment in your thinking to use them correctly. This article tells you how VB.NET dialogs work.The VB.NET LinkLabel
LinkLabel, new in Visual Basic .NET, is a standard control that lets you embed web-style links in a form. Like many VB.NET controls, this one doesn't do anything that you couldn't do before ... but with more code and more trouble. LinkLabel makes it easy. This article tells you everything you might need to know about using it.Visual Basic Compiler Directives
Visual Basic Directives are the other Visual Basic. It's just a two-statement language, but you can use to "direct" the Visual Basic compiler. The resulting compiled program never contains code from these statements, but different types of programs can be created by using them. This article explains how to do it.Visual Studio Macros
Starting with Visual Studio 2003, the tradition of macro programming has been restored to Microsoft's development technology. Macros are Visual Basic programs that automate the work that you can do inside Visual Studio - menu selections, keyboard entries and so forth. These programs can then be stored and recalled with a single command or keyboard stroke. But a Visual Studio macro can also be much more. This article explains it all.How To Use (And Create) Code Snippets - Part II
Using Intellisense Code Snippets - Intellisense Code Snippets are ready-made chunks of code that you can quickly plug into your Visual Basic projects. But they're much more than just code. Visual Basic 2005 includes over 500 code snippets but you can create your own. This article shows you how to do all of this and more!How To Use (And Create) Code Snippets - Part I
Using Intellisense Code Snippets - Intellisense Code Snippets are ready-made chunks of code that you can quickly plug into your Visual Basic projects. But they're much more than just code. Visual Basic 2005 includes over 500 code snippets but you can create your own. This article shows you how to do all of this and more!Very Simple Encryption using VB.NET
Learn how to code your own very simple encryption with this Visual Basic .NET program. Sophisticated and virtually unbreakable encryption is available in abundance in today's software. But setting up and using "industrial strength" encryption can be a lot of effort. If you just want a way to encrypt a simple text file, here's a downloadable program that does the trick, programmed in VB.NET 2005 Express.Application Settings in VB.NET 2005
VB.NET 2005 gives you a sophisticated new way to persist application settings such as connection strings or component properties like size or color by application or by user. The methods used in VB.NET 2005 are different than the ones in VB.NET 1.1 and other .NET languages such as C#. Technical articles on the web and even on Microsoft's own pages frequently make mistakes in describing how it's used. This article clears up the confusion.References and Namespaces in VB.NET
The concept of a namespace is new to VB.NET and this makes it one of the things that can confuse someone making the switch from VB 6 to VB.NET. This article explores the concept of a namespace and explores the different ways that it can be used in VB.NET. The article was inspired by a thread in the About Visual Basic Forum.Using Files as a Database
A database is often just a little too much for a simple program that only needs to manage a few "records" of data. If your program needs a few items, but not enough to justify setting up a complete database, this article shows you how to use multiple files for a "quick and dirty" database. The files are maintained using XML. The new "My" namespace in Framework 2.0 is also used to manage the files. The first article in this two part series describes how to create the XML portion of the program.Coding an XML Configuration File
Creating a configuration file is a common programming task. This article shows how to create one using standard XML and Visual Basic .NET 2005. The article also includes the complete code for a sample application that persists basic information for a stock market calculation utility program.MSBuild: A New Build Technology Added In Visual Basic 2005
"Build" is the process of controlling the creation of compiled solutions. MSBuild is a new way to "build" these software solutions in Microsoft .NET Framework 2.0 and Visual Basic 2005. This article describes what's new and introduces MSBuild concepts.Early Binding and Late Binding
An explanation of "early binding" and "late binding" with the advantages of early binding explained and examples. This article was written for, and tested with VB.NET 2005 Express Edition but the concepts apply to any version.
The "textbook" definition goes something like this (copied from Microsoft's MSDN page):
"An object is early bound when it is assigned to a variable declared to be of a specific object type."
Queues and Stacks - Another great tool in VB.NET
A Calculator program, previously featured at About Visual Basic, is reprogrammed using the VB.NET Queue object rather than conditional logic for more clear code, smaller code, and the elimination of bugs in the previous version. The VB.NET Stack object is also explained.VB 6 Collection, VBScript Dictionary, and VB .NET Hashtable
The VB 6 Collection object, the Scripting Dictionary object and the VB .NET Hashtable object Explained! In this mini-tutorial, we'll go over the idea of collections, dictionaries, and hashtables and then demonstrate those ideas with code. This is a great "how to" for those of you who want VB.NET explained in terms of what VB 6 can do.Visual Basic .NET & the .NET Platform: An Advanced Guide (book review)
When you first pick this one up from the shelf in the bookstore, you know you're into something serious. At almost two inches, over a thousand pages, and over two thousand files in the source code download -- this one is for real.VB.NET: What Happened to Control Arrays!!!
Although a lot of VB.NET experts say that leaving VB 6 'control arrays' out of VB.NET is a positive step, it drives many VB 6 programmers bats. Here's a two part article that tells you everything you need to know about how to replace this function in VB.NET.VB.NET Adds Block Level Scope
One of the changes in VB.NET in variable declaration is a new "block level" scope. Although your first impression might be that this is a great new way to tighten up your code by getting rid of variable declarations for entire procedures when all you need is a counter or flag in a block, once you dig into it there are some problems.VB .NET Hashtable, Capacity and Loadfactor
When you actually measure the performance of the Hashtable object with different parameters, you get some strange numbers. Parameters can be passed when a Hashtable object is created that are supposed to affect performance. But the results were not what was expected.The VB.NET Upgrade Wizard
The Web is full of articles about the differences between VB 6 and VB.NET. Most of these are long lists of differences ... additions, changes, deletions. Just browsing these lists is a real cure for insomnia. But few of them take you completely through an actual conversion. That's what we do in this article.Program an ASP.NET File Based Output Cache
Caching - storing data for future requests - is one of the top features of ASP.NET. This "pro level" article shows how to create an output cache - a cache of a completely rendered ASP.NET page - using a regular disk based file. This capability uses a new feature in ASP.NET 4.0. You can use the code here as it is, or base your design of more advanced ASP.NET output caching on it. This article assu…Create a Random Collection of Unique Integers
A random collection of unique integers is a requirement for most card games and for many other applications as well. This program shows you how to create the collection using a Lamda expression. It also shows how this method performs with graphical results using the StopWatch object. Another method using arrays and more traditional coding can be...Attributes in VB.NET
Attributes store information about an assembly, a class, a method and many other entities in the Visual Basic assembly metadata. This article explains how it works. It's also part one of a two part article where part two shows you how to embed a private key in the metadata so you can send the entire thing to someone and have a reply securely...Multiple Form Instantiation in VB.NET
Should you instantiate a Form before using it in VB.NET with the syntax: Dim myForm as New Form? Technical articles usually recommend that you do. But the real pro's and con's are examined in this article and the traditional recommendation might not be right anymore.Logical Expressions
Complex logical expressions are not often required in Visual Basic programs, but when they are, it can be really difficult to get them right. This article is a practial (not theoretical) guide to the most popular and useful techniques such as Boolean Algebra, truth tables and Karnaugh maps.Data Type Conversions in VB.NET Measuring Performance using DirectCast,...
Casting is the process of converting one data type to another, for example, from an Integer type to a String type. Some operations in VB.NET require specific data types to work. Casting creates the type you need. The first article introduces casting. This article comparies the performance of DirectCast, CType and TryCast.Adding To Your First Database Centered Application for Beginners
Coding a SQL Server database application doesn't have to be an impossible job for a beginner. This article is the second part of a series intended to open up database programming even if you don't already understand it. In the first article, a single table database is created and used to code the traditional "recipe file" app. In this article,...Coding the VB.NET Many-to-Many Database App
Many-to-many database relationships are needed in a lot of applications. But in spite of that, it's not that easy to find explanations showing exactly how to program one. The sixth article in this series written for VB.NET programmers who are new to programming databases, shows and explains the code to do this critical type of database application.Enterprise Library - A FREE Resource From Microsoft
Microsoft Enterprise Library may be a resource that can help you move up to world class code. If you need to understand what it is and how to get started, this article is for you. Included in this article is a review of Microsoft's own Visual Basic based guide to the Enterprise Library.Programming a TreeView
The TreeView class can be one of the most useful ways to organize information visually of any in VB.NET. You see it constantly on web pages, especially at Microsoft. But it's just different enough so that it's often not the first idea many programmers have. This article covers the Windows forms version of TreeView and is designed to change that.Create Random Arrays of Unique Integers
A random array of unique integers is a requirement for most card games and for many other applications as well. This program shows you two ways to create a random array of unique integers, and also shows how they perform with graphical results using the StopWatch object. Another method using collections and a Lambda expression can be found in a...The Form as an Application
Visual Studio makes us lazy because it does everything. This article explains what a Form application really is and shows how to run one as an application from a console application, both as a single threaded apartment (STAThread) and a multithreaded apartment model (MTAThread).The Entity Framework
The Entity Framework is only the latest in growing collection of technologies that are all aimed at making it easier for application code to work with databases. Introduced with Visual Studio 2008/Framework 3.5, this technology is most useful for large, complex industrial applications. Rather than just provide tools for the application, the...Events Using Your Own Code in VB.NET
VB.NET Programmers usually know about handling multiple events with the same subroutine or how to code a delegate. (VisualBasic.About.com articles cover all of these things too.) These are parts of a more general process of event handling. This article starts at the beginning and shows how all of the parts work together using a completely custom...Shared Events in VB.NET
Most programmers know about shared methods and properties in VB.NET. Shared events are a fairly rare item in code, however. They're primarily useful when you have a parameterized constructor that must raise an event but inventive minds can probably find other uses too. This article is a companion to an earlier article on the creative use of the...VB.NET Versus Python
A personal perspective of Python based on my attempt to code a finite state machine in Python. After struggling for days to write the program in Python, I wrote the same program in a few hours in VB.NET. The program requires the use of regression to work, so this example demonstrates the code to "walk" an algorithm using VB.NET. Some code using...Classes - Base Classes and Derived Classes
Classes are the heart of .NET and VB.NET because they're the way Object Oriented Programming (OOP) is actually implemented. A class is the basis of an object. This is one of a series of detailed articles about classes. This article covers base classes and derived classes and introduces inheritance.Overriding ToString
ToString is one of the fundamental objects in .NET because it's in the Object Object. That means it's available to every object. All of them. Since it's fundamental, it's worth learning more thoroughly than other objects. This Quick Tip shows how to override ToString with your own custom processing.Designing Classes - The Singleton Design Pattern
Technical articles, including those at About Visual Basic, usually discuss the detailed syntax of VB.NET, not the overall philosophy of why you might want to do things in a certain way. Design Patterns, on the other hand, are all about the why and how of programming, not the syntax. This article, one of a series about design patterns in VB.NET,...Inheritance - A Contrast with the Delegation Design Pattern - Part 2 of 3
Design Patterns can be difficult. So this article, part 2 about the Delegation design pattern in VB.NET - is actually all about inheritance since it explains an example intended to contrast with delegation that is based on inheritance instead. Parts 1 and 3 explain the delegation pattern.A Real World Example of the Delegation Design Pattern - Part 3 of 3
This is Part 3 of a series about the Delegation design pattern in VB.NET. This part shows a more real world example of the delegation pattern based on the general case code in part 1 that you can contrast with the inheritance based example in part 2. Part 1 is a theoretical "general case" of the Delegation design pattern and part 2 is a counter...The General Case Delegation Pattern - Part 1 of 3
Technical articles, including those at About Visual Basic, usually discuss the detailed syntax of VB.NET, not the overall philosophy of why you might want to do things in a certain way. Design Patterns, on the other hand, are all about the why and how of programming, not the syntax. This article, one of a series about design patterns in VB.NET,...Design Patterns - The Factory Pattern
Design Patterns deal with the fundamental techniques of how and why you write code in a certain way. This article is one of a series that explains the popular design patterns using the syntax of Visual Basic - VB.NET. The subject of this article is the Factory design pattern.Coding the Double Linked List "The Hard Way"
The linked list is one of the foundation concepts of programming and it's supported directly by VB.NET language elements. But you can code one "the hard way" too. This article shows one way to do that for a double linked list. The article also features some interesting code details with inherited classes and objects on the heap. Understanding...
View More

