.NET Sample Code
-
FTP client library for C#
by Dan Glass
An FTP client library for C#, including asynchronous operation
-
C# WebCam Service with FTP and Installer
by Dan Glass
A C# WebCam Windows Service demonstrating FTP upload, Windows Service Installer, and file rotation.
-
How to simulate a status bar in a Web application
by Edward Tanguay
If you have a process that takes over 20 seconds or so on a Web application, you may want to let the user know the status of the process. Edward shows you how.
-
A shell for Google's image search
by Michael H
A program that searches on Google's Image Search.
-
Sending Email With an Attachment
by James Crowley
A simple bit of code demonstrating how to use the MailMessage object to send an email with an attachment.
-
How to check to make sure a URL is valid
by Edward Tanguay
A neat bit of code that checks if a domain is valid and actually exists.
-
How to create PDF files from ASP.NET pages
by Edward Tanguay
How to create PDF files from ASP.NET pages with Crystal Reports without using Visual Studio.NET
-
Screen Resolution
by Bharat Nagarajan
Helps you to get the screen resolution from VB.NET
-
List Files in a Directory
by JesusFreak
A little code snippet that lists files in a directory
-
Pinging a host from VB .net
by MstrControl
A class that allows ping a computer.
-
Image to HTML
by Michael H
A simple program that converts images into blocks of font tag colored 1s and 0s.
-
Flatten That Combo Box, Man!
by Stacey Brown
A .NET class written in VB.NET for your own flat combo box.
-
An AutoRedraw Property
by Michael H
A simple AutoRedraw property to fool around with.
-
API Samples
by Matthew Taylor
Shows samples of how to use different kinds of APIs. Changing and getting different system settings such as mouse position, beep length and frequency, computer name, user name, drive type, swap mouse button. You will need to create the needed controls on the form before accessing them in code of course.
-
How to “Snap” the Cursor
by Karl Moore
Learn how to move the cursor position to slap bang in the middle of your control.
-
Are You Running in the IDE?
by Karl Moore
Here's how to detect if your .NET code is currently being debugged, or if we're in design mode.
-
Crafty Conversion Between Graphic Formats
by Karl Moore
Think converting images between different formats is complicated in .NET? Think again. Karl shows you how.
-
Random Numbers... That Work!
by Karl Moore
Has all this talk about seeds got you confused? Here's a nice snippet to show you the best way to get random numbers in .NET.
-
How to measure how long a task takes
by Edward Tanguay
If you want to compare the performance of two processes, you can use this code to measure and print out the time takes by each process
-
The Ordinal Number Function
by Karl Moore
Give numbers their ordinals back.... this function automatically returns the correct ordinal; "st", "nd", "rd", "th" depending on the number you give it.