A True Tree User Control for Presenting Hierarchical Data
The standard TreeView control that is available in .NET is powerful and sufficient in most cases, but there are situations where seeing data in a true tree format is more intuitive vs. seeing data in the TreeView. The focus of this article is to show how to present hierarchical data in a true tree format, as an alternative to using the standard TreeView control.
Allowing Only One Instance of a Windows Forms Application
Standard Windows Forms applications can be launched multiple times and each instance used completely independently of the others. However, sometimes it is important to restrict the user in launching only one instance of a program.
Build Hyperlinks into Your Client App with the Windows Forms LinkLabel Control
LinkLabels are Windows Forms controls that enable a user to hyperlink to a URL that points to either the Web or the local directory system. While the SDK documentation discusses the control, it does not demonstrate how linking is accomplished, nor does it outline the power and flexibility the control provides. This article fills those gaps, showing how to link using the LinkLabel control. It also shows the flexibility of this control for the programmer using the .NET Framework. In addition, the author covers the large number of properties that allow you to customize your controls and accurately place them. Their built-in behaviors are also discussed, along with their use in both Visual Basic .NET and C#.
Capturing the Screen Contents in .NET 2.0
When supporting installed software, descriptions of problems can be enhanced greatly by viewing the contents of the user's screen. In this article we will explore how to perform a screen grab and display the captured image in a Windows Forms application.
Creating a Battery Power Status Monitor in C#
Sometimes programs need to know the power status of a computer. An example is Windows Update, which often requires a computer to be running on mains power before updates are installed. This article explains how to read the power status and battery life.
Creating a Draggable Borderless Windows Form in C#
For programs that require a non-standard interface, you can remove the borders of your forms. Once removed however, the user has no title bar to use to allow the form to be repositioned. This article describes how to allow dragging of a borderless form.
Data Management in Windows Forms Applications, Part 1
I've always enjoyed doing user interface work. The ability to put my work right on the screen in full view is what makes UI work different from back-end business logic. It feels more satisfying somehow to write code that does something on the screen, rather than just adjust an account balance somewhere in some database.
Detect the Status of a Windows Service (C#)
When developing software that relies upon the availability of Windows services, it is important to be able to determine a service's status. This article explains how to check if a service is running, either on a local computer or on a remote server.
Drag and Drop in Windows Forms - A Primer
Examples of how to implement Drag & Drop in Windows Forms including TextBox, TreeView and Dragging a control around a form.
Hosting Windows Forms Controls in COM Control Containers
As wonderful as the new Windows Forms control model is, if you still need to host controls in COM control containers, you are limited to exactly one control host that also supports the hosting of Windows Forms controls: Internet Explorer. However, if you're brave and can stand the heat from the kitchen, you may have some luck hosting Windows Forms controls in other COM control hosts, including VB6, Office, ATL, and MFC. Since a Windows Forms control implements COM control interfaces and behavior, this can be made to at least seem to work (although it is not supported by Microsoft, even a little bit).
Hosting Windows Forms Designers
Shows how to write the code needed to host the Windows Forms
Designers in your own application. Sample code is provided to
display a form in design mode and allow normal editing like in
Visual Studio.
How To Implement Long Running Tasks in Windows Forms
Have you ever needed to perform long running operations in a windows form? Perhaps its some complicated mathematical function, maybe is some long OLAP processing. In this tutorial I'm going to cover how I modified my Rapid Mailer Email Campaign program to send emails asynchronously, without freezing the main windows form, and also allowing the user to cancel the long running email campaign.
Implementing Drag and Drop in Windows Forms
One of the benefits of using a windowing system is the ability to drag and drop objects from one window to another. Such is the functionality that we have taken for granted when using Microsoft Windows. Though it seems such a trivial task, not much has been written about how to implement drag and drop in your Windows application. In this article I will discuss how you can use Windows forms using the .NET Framework to develop applications that support drag and drop operations.
Introducing Windows Forms
Learn about the new forms package, allowing developers to take full advantage of the rich user interface features available in Windows
Passing Values between Forms in .NET 1.x with C# and VB.NET examples
I wrote this article in response to the almost overwhelming number of requests on forums on how to pass a variable from a one Windows Form to another. In fact saying that it is going between one form and another is somewhat of a misnomer because this will work for any type of object not just Forms. This seems to be one area in which beginners in C# and VB.NET often get stuck. So, rather than have to repeat myself often in forums I wrote this article so that I could point people at it so that they will have the benefit of a full explanation as well as the answer to their problem.