.NET Sample Code
-
Creating a dynamic graphic which returns a .jpg
by Edward Tanguay
This code allows an .aspx file to receive parameters (file name and width of picture) and return a JPEG resized to the requested width.
-
How Big is that File – in English?
by Karl Moore
Not everyone wants to convert 2147483648 to 2 GB in their head every time we want to know how big a file is. Here's an easier way.
-
Database Independent ADO.NET 2.0
by Xavier Larrea
ADO.NET 2 has new classes that makes it quite easy to write data-programs independent of the database engine. Learn how here.
-
Encoding your script files
by ElementK Journals
Protect both your server-side and client-side scripting by using the MS encoding utility
-
How to “Snap” the Cursor
by Karl Moore
Learn how to move the cursor position to slap bang in the middle of your control.
-
Create PDF Files on fly in C#
by Salman Zafar
This sample code shows how to use the iText library to generate PDF files on the fly. The iText classes are very useful for people who need to generate read-only, platform independent documents containing text, lists, tables and images.
-
Virtual Stack
by Daniel Okely
This is an implementation of a stack.
-
VB6 NMEA Interpreter Class for Reading GPS
by Alex Etchells
A VB6 version of Jon Person's .NET NMEA Interpreter Class as referenced in 'How to Write a GPS Application'. GPStest.zip contains the class and a simple project demonstrating implementation.
-
A PagingRepeater control
by Dan Glass
A PagingRepeater control extending Repeater with page navigation
-
UI Threading Helper Classes
by Roy Osherove
One of the most cumbersome things you will ever have to do with Winforms is updating your User interface while receiving events from another thread. These helper classes make it a breeze.
-
CExtStatusControlBar - Managing status bar's panes
by Dmitriy Yakovlev
An enhanced status bar which allows you to easily add/remove almost any controls to/from its panes, on-the-fly.
-
XML/XSD Schema Validator
by joe miguel
To teach how to write XML and Schemas (or DTD's). Some of the schemas language can be difficult to understand. I needed an easy (and free) way to know if my work was correct, if not then exactly what was wrong with it. As implied above, this example will also show you how to use schemas in your own programs.
-
Databinding SqlTypes
by Dan Glass
Demonstrates how Databind the SqlTypes using the PropertyDescriptor class and the ITypedList Interface.
-
Using the NotifyIcon control
by Colin Harman MACITP
This short article describes how to use the NotifyIcon in your applications and how to add menus to the icon.
-
A Chat Client/Server Program for C#
by Michael H
Source code for a chat server, and the accompanying client program.
-
List Files in a Directory
by JesusFreak
A little code snippet that lists files in a directory
-
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.
-
clsFolderBrowser
by MstrControl
Implements the SHBrowsrForFolder capability on a .NET environment.
-
How to validate an XML file with an XSD file
by Edward Tanguay
Demonstrates an ASP.NET Web Form which tells you if your file is not well-formed and then if it is not valid it lists out the specific reason (like in XMLSpy), quite helpful to find an error in a large XML file as it returns the line number on which the error occurred as well as the tag name.
-
Integrate Web Content
by ElementK Journals
How to integrate web content into your site using the Internet Transfer control