Microsoft Visual Basic Corner

How I Learned to Stop Worrying and Love Visual Studio Team Services

Tue, 16 Jan 2018 15:29:00 GMT

After suffering the consequences of accidentally turning off his firewall for a month and then experiencing a catastrophic workstation failure that took out both of his mirrored hard disks, Tim Patrick gained a new appreciation for online code repositories. He adopted VSTS and won't be looking back.

Replace a Running Application with a New Version

Fri, 15 Dec 2017 13:06:00 GMT

One situation that can prevent a successful file transfer is when the destination file is, in fact, the program that's doing the copying. Here's how to work around such problems.

OOP Code Focus: Clone a Derived Instance from a Base Object

Tue, 28 Nov 2017 18:51:00 GMT

OOP is a special kind of animal, says Tim Patrick, who shows how to put one of its core principles, encapsulation, to work while coding constructors for base and derived classes.

Storing Configuration Data in the Windows Registry Playground

Thu, 16 Nov 2017 13:15:00 GMT

Today, application settings are more likely to appear in local XML files, but the Windows Registry and its hives of key/value pairs can also be used. The good news is that interacting with the Registry is straightforward, as Tim shows you here.

Hide Compiler Warnings in Your Spare Time

Mon, 09 Oct 2017 16:51:00 GMT

Learn how to keep new code-style warnings from filling up your formerly pristine Visual Studio Error List panel.

Extracting Data with Regular Expressions

Tue, 26 Sep 2017 20:00:00 GMT

Regular expressions give Tim Patrick the creeps, but he overcame his fears by discovering specially crafted regex patterns can access data in a way that’s actually kind of cool.

Windows Forms: Don't Skimp on the Caps Lock Warning

Tue, 22 Aug 2017 18:45:00 GMT

If you've ever worked in an enterprise environment and fielded calls from employees unable to get into their accounts due to a depressed Caps Lock key, you know how essential the following tweak to your code can be.

Embellish Your Web API Responses with Header Data

Wed, 09 Aug 2017 00:40:00 GMT

Learn how providing information in available HTTP header elements can help make interactions between unrelated systems straightforward and meaningful.

Create Parameterized Queries in ADO.NET

Thu, 27 Jul 2017 08:00:00 GMT

Squash the dangers lurking in your SQL queries by setting parameters by way of parameterized queries.

C# Goes Back to BASICs with Local Functions

Mon, 26 Jun 2017 20:39:00 GMT

C# finally gets the BASIC GOSUB feature through local functions, but local functions take that GOSUB-like capability up a few notches.

The Fraternal Twins of Equals and GetHashCode

Thu, 01 Jun 2017 18:40:00 GMT

Lots of searching through lots of data means potential app performance degradation. Hash codes can speed things up.

Adding New Formats to Old Data

Wed, 05 Apr 2017 22:16:00 GMT

The custom formatters in the .NET Framework provide a more seamless way to mix traditional and custom formatting situations.

C# and VB Data Conversion in a World of Cruel Users

Wed, 29 Mar 2017 20:11:00 GMT

While Visual Basic is a bit more forgiving with data conversions, you'll need to jump through some hoops to do similar conversions in C#.

Transforming Windows Files on C++: What's Fastest?

Mon, 06 Mar 2017 23:20:00 GMT

We just covered background information on our last file processing foray. Now, what's faster: CRT, Windows API, or something else?

Pattern Matching in C# 7.0 Case Blocks

Thu, 02 Feb 2017 18:48:00 GMT

Welcome to the 21st century, C#, now that case blocks support a variety of pattern-matching formats.

4 Ways To Transform a File on Windows with C++

Thu, 26 Jan 2017 20:20:00 GMT

On the Windows platform, the C++ language offers several ways to process a file. We'll look at four approaches for serial IO access.

Making Sense of Class Modifiers in C# and Visual Basic

Wed, 11 Jan 2017 17:14:00 GMT

Both are .NET Framework-based, but they don't seem to be speaking the same language.

Getting to Know Your Assembly by Name and Number

Tue, 03 Jan 2017 18:33:00 GMT

Let's take a quick side trip and see what information we can glean from the .NET assembly.

Hashing Passwords for Fun and Security

Thu, 15 Dec 2016 18:29:00 GMT

Hashwords can use a pinch of salt for added security. There's a .NET class for that.

Use Custom Visualizers for C++ Objects

Thu, 08 Dec 2016 17:39:00 GMT

Sometimes the default view of objects in the debugger isn't enough, especially if you operate on complex data structures. Here's one way to alter the view and use a customized one.

It's Safe to Handle Unhandled Visual Basic and C# Exceptions

Mon, 28 Nov 2016 08:00:00 GMT

Pile on the exceptions, and .NET will have your back with the tools it provides at your disposal.

Life Without On Error Resume Next

Tue, 15 Nov 2016 16:00:00 GMT

The alternative to that simple error-handling combo is the Try...Catch, but it's not as simple as wrapping up your code with it.

Debugging Mouse Clicks and Dragging in C++

Tue, 01 Nov 2016 22:05:00 GMT

Debugging mouse events is especially confusing, because when the debugger stops the code, most of the events go away! What tactics can we use in these situations?

Magic Forms Access in Visual Basic and C#

Thu, 27 Oct 2016 18:08:00 GMT

Look behind the curtain on this one, and you'll see that code is quite magical in and of itself.

Strategies for Debugging Lots of C++ Objects Effectively

Thu, 20 Oct 2016 18:11:00 GMT

When you have code that is called for many objects it's hard to go through all them and just check line by line. How can you more efficiently debug lots of code?