RSS Feed
May 12

Practical Programming: Hidden Talents

Posted on Tuesday, May 12, 2009 in Practical Programming

by Peter Jones

This edition of Practical Programming covers a set of three useful classes / namespaces from the .NET Framework that you probably aren’t familiar with (yet).

Let’s make some noise: System.Media

Producing sound from a computer is something you may have learned in Programmer Playschool and promptly forgot (like me), but it is a useful little feature to add to all types of software, not just desktop games. Playing a system sound or other sound files is very useful in monitoring environments where the users are not seated in front of a computer 24×7 (for example, in server rooms or manufacturing environments).

(more…)

Apr 1

Creating Useful Installers with Custom Actions

Posted on Wednesday, April 1, 2009 in Practical Programming

by Christian Jacob

christian-jacob So you are almost done with implementing a ground breaking, state of the art, super duper plugin-enabled calculator application with syntax highlighting and now you are wondering how to get it deployed? In case you are already trying to put some arguments together to convince your boss for buying a suite to building Microsoft Installer packages worth several thousand dollars: Stop! Don’t do that. Well, at least not if your application is not as complex as let’s say your development environment.

Using Microsoft Visual Studio you should be able to create an MSI in literally no time by using the predefined Setup Project template and if you need to accomplish additional tasks that Windows Installer does not support out of the box, read on to find out how to extend your installer with own custom actions.

(more…)

Mar 1

Banking with XML

Posted on Sunday, March 1, 2009 in Practical Programming

By Peter Jones

peter_jones Remember XML? Remember those fun times you had creating XML data files, XSL’s and DTD’s using Notepad? It seemed like such a great thing to do. There were grandiose plans to save the world with markup.

Today, XML is just another file format thanks to great tools and (reasonably well followed) standards. The tools in Visual Studio do such a great job of encapsulating XML that we often forget that it even exists under the covers.

And then along comes a scenario where you need to dig deep and reach for those reference manuals (or search engine). Recently I had just such a challenge.

(more…)

Jan 16

Practical Programming: Sending Email

Posted on Friday, January 16, 2009 in Practical Programming

By Derek Hatchard

Derek_Hatchard Sending email from a .NET application is incredibly simple:

using System.Net.Mail;

SmtpClient _smtp = new SmtpClient("smtp.test.com");
_smtp.Send(""
           ""
           "Subject"
           "Body");

With just these few lines of code, you are sending an email from to . Pretty easy stuff.

But what if you need something a little more complicated? The example above assumes the standard SMTP port for email with no authentication and an unencrypted connection. Fortunately these “complications” are quite easy to deal with in .NET.

(more…)

`

Bad Behavior has blocked 165 access attempts in the last 7 days.