Articles Index - page 3
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.
VB.NET Adds Block Level Scope
In addition to making required variable declaration the default, VB.NET adds a new block level scope for variable declaration This article shows what has changed, but also explores some results of this change that you might not expect.
The IComparable Interface: An Intro Using a Custom Sort
Interfaces can be a problem for programmers who aren't familiar with the concept. The way to understand them is to go step-by-step through an example that uses one. The Highschool Husband Hunters Report does exactly that using the IComparable Interface and a customized sort routine.
Of Ticks and Timers
.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 two very different ways to write both a VB 6 and a VB.NET program to do the same thing.
Bitwise Operations in VB.NET
VB.NET doesn't support bit level operations directly. Framework 1.1 (VB.NET 2003) introduced bit shift operators (<< and >>), but no general purpose way to manipulate individual bits is available. This article shows how to do it.
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 - It's Not Your Father's TextBox
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.
Create Forms in Any Shape!
Here's a way to give your VB.NET application a completely unique look and feel. Create a form for your application in a custom shape. It's relatively straightforward to do. This article shows you how.
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.
Focus and Select
Focus and Select are methods available in Visual Basic .NET that seem to be completely identical. This article explores whether they really are identical, and if not, what differences exist.
Changing Properties "On The Fly"
Properties don't have to stay the same in VB. You knew that, of course, because Text is a property that you change frequently in program source. But you can expand the flexibility of your programming by finding and changing properties of all controls.
Operator Overloading
It's possible to define totally new ways to use most of the fundamental VB.NET operators such as addition ("+") or subtraction ("-") so they do what you need them to do with your own objects. This article shows you how it's done.
Enum - A Building Block of Visual Basic
The Enum is a fundamental part of Visual Basic that dates back to before VB.NET. This article shows you what it is and how to use it in programs.
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 answers a reader's question about how to use GDI+ to draw and control a circle of other circles.
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.
Modules, Structures, and Classes
There are just three coding structures for objects that you can use in VB.NET projects: modules, structures, and classes. This article explains the fundamentals of what they are and how to use them.
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.
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!
Programming the Registry using VB 6 and VB.NET
The Windows Registry continues to be used for a wide variety of critical information. Learn what it's for and how to use it in VB 6 and VB.NET programming.
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.
"Static" (that is, "Shared") versus Dynamic Types in VB.NET
Students of Visual Basic .NET may not fully understand the concept of what static (Shared in VB.NET) and dynamic mean in object oriented programming. This article explains it.
