Category: WinForms
List Drives and Folders in a TreeView Using C#
The .NET Framework makes it easy to read drive and folder details but it does not include a Windows Forms control to automatically list them other than the FolderBrowserDialog control.
Displaying an Image Without Locking its File
The PictureBox control is one of the most used controls in Windows Forms applications. And sometimes you might want to delete the image file that is displayed on it. Doing so with an image displayed using the Image.FromFile function will result in a file locked exception. And file will stay locked until the program exits, [...]
Opening a File With its Default Program
When developing a Windows Forms application you sometimes need to open a file using the default program associated with it automatically for the user view or edit it. This could be done by just calling the System.Diagnostics.Process.Start function and passing the file name and path as a string. It works with any file type as [...]
Drag And Drop Files to a C# Application
The .NET Framework makes it easy to detect objects dragged and/or dropped into a Windows Forms application using one or more of the drag-and-drop events available. In these events you could check if the object is a file.
Get the Available Network Connections Using WMI
Windows Management Instrumentation (WMI) makes querying Windows for system and devices information easy. And this is even easier with System.Management assembly. The code listed loads the names of the network connections in a ListBox, which when clicked displays all the available properties in a ListView.
Simple Networking Tasks in C#
Developing applications in C# that access resource on the internet is easy. This post shows four useful functions: checking if the PC is connected to a network, domain name to IP address lookup, ping a host and download a file.
A Registry Viewer in C#
The Registry is a database in Windows that is available for application developers to use for storing small amounts of data. It is mostly used to save application setting like the window size and database connection string. In this series of post I will demonstrate how to create a simple registry editor in C#.
Displaying an XML File in a TreeView Control
XML’s structure is hierarchical and therefore can be displayed in a TreeView control easily. The XMLTree program displays the elements of the XML file in a TreeView control and the attributes of the selected element in a ListView control.
A Wrapper Class For hostip.info’s GeoLocation Service
GeoLocation refers to identifying a real-world geographic location of a computer, device or website visitor. There are a many websites that provide this service, some are free and some are not. A populare and free one is hostip.info. It provides country, country code, country flag, city, latitude and longitude of an IP address.
An Open Source Website Screen Capture Program
A few weeks ago I posted Taking Thumbnails of a Website, that shows how to take a screen shot of a website using the Web Browser control. I used the code from the post to develop SiteCapture as an open source application.

Connect