Playing the default Windows sounds from C# used to require InteropServices and system calls. Fortunately, .NET 2.0 includes a new System.Media namespace with three classes that simplify playing system sounds and audio files:
One of the things I miss about C++ is the #define keyword that allows you to create an abbreviated alias for a long type name. Fortunately, C# provides a way to alias a long namespace or class name while retaining full type-checking.
To alias a namespace or class name, use the using directive to define the alias as shown in the sample code below. Then you can use the alias anywhere you would normally use the class name or namespace. The scope of a using directive is limited to the file in which it appears.
If you use images in a .NET application, chances are you will find it more convenient to embed those images as resources in your project, rather than leaving them as separate files and trying to locate and load the images from disk when the application runs.
The DoDragDrop method on a control is synchronous. This means that when you call DoDragDrop to start a drag operation, the program will not return and execute the rest of your handler code until the user 1) drops the data she is dragging, or 2) cancels the drag operation. This is one of those little facts that you need to file away in your brain, as it could have a profound effect on your drag & drop logic.