Monthly Archives: May 2013

How to find the Immediate window in Visual Studio Express Edition

Some versions of Visual Studio Express Edition come with various tools deactivated or hidden. It’s not clear whether Microsoft does this to gently encourage you to buy a more expensive version or whether they truly don’t think Express Edition users … Continue reading

Posted in IDE | Leave a comment

Map device coordinates to world coordinates in C#

Sometimes it’s convenient to draw in one coordinate system (called world coordinates) and map those coordinates to the screen’s device coordinates. The example, Use transformations to map points from one coordinate system to another when drawing in C# shows how … Continue reading

Posted in graphics | Leave a comment

How to send an SMS text message in C#

This example finishes the series showing how to make a C# program send an SMS (Short Message Service) message. You could use this technique to make a program monitor some sort of ongoing process and send you a message if … Continue reading

Posted in miscellany, system | Leave a comment

How to extract only some of the information from a JSON file in C#

Recall from my post Anatomy of an example that my original goal with this series of articles was to write a program to send an SMS message. To do that, I want to download a file listing SMS gateway email … Continue reading

Posted in algorithms, serialization | Leave a comment

Use JSON to serialize and deserialize objects in C#

JSON (JavaScript Object Notation) is a standard for textual storage and interchange of information, much as XML is. Before you roll your eyes and ask if we really need another language to do what XML does, consider how verbose XML … Continue reading

Posted in algorithms, serialization | 1 Comment

Download and display a text file whenever a program starts in C#

When this example program starts, it downloads a file from the internet and displays it. You could do something similar to display a message of the day or announcements for your program. The program uses the following Load event handler … Continue reading

Posted in files, internet, web | Leave a comment

Anatomy of an example

Sometimes someone asks me a question that leads to an interesting example that I post here. Usually I have to think of something interesting myself. Occasionally that leads to a new idea, which leads to a new idea, and so … Continue reading

Posted in miscellany | 1 Comment

Make an owner drawn ListBox that left and right justifies columns of values in C#

The following examples show different ways to make a ListBox control format and align values. Right-justify values in a ListBox in C# Use the ListBox control’s FormatString property to format values in C# Set tab positions inside a ListBox or … Continue reading

Posted in controls, fonts, graphics, lists | Leave a comment

Draw rows of data in left and right justified columns in C#

This example draws a series of rows with columns left or right justified. The program uses the following code to define the data it will draw and the row and column alignments. // The values. private string[][] Values = { … Continue reading

Posted in fonts, graphics, lists | Leave a comment

Use the ListBox control’s FormatString property to format values in C#

The ListBox control’s FormatString property determines how the control formats the values it displays. This can be particularly useful if you need to display values that need special formatting such as dates and currency amounts. When it starts, this example … Continue reading

Posted in controls | Leave a comment