2003 - January/February
The January/February issue of Component Developer Magazine (CODE) is focused on Windows Forms, and contains several in-depth articles focused on that subject, as well as several general .NET articles.
-
Working with Extender Classes
Extender classes do just that; they allow you to extend the functionality of a .NET control class. The Error Provider and Tooltip classes are two examples of extender classes in the .NET Framework. The Tooltip class represents a significant departure from how tooltips were implemented in earlier versions of Visual Studio. The Error Provider class provides a new way to inform users about invalid input. Although each class serves a different purpose, their implementation is quite similar. This article introduces these two classes and gives a brief, yet comprehensive primer on how to use them
-
Reflection Part 2: Emit
In our previous article, Reflection Part 1: Discovery and Execution, we introduced the System.Reflection namespace and its classes which allow developers to view assembly metadata, query for and discover types, and invoke code?all at run-time. In this article we will examine reflection emit?the ability to dynamically generate code at run-time.
-
Shaped .NET Windows Forms
Since the earliest versions of the Windows operating system, all Windows have been rectangular.However, the number of applications that break out of this boring mold is rising. Even Microsoft, the king of rectangularity, is starting to create applications that use shaped windows, such as Media Player. Unfortunately, creating shaped forms has always been quite tricky. Until now that is! The .NET Framework and the Windows Forms package in particular make it easy to produce forms that have rather sophisticated shapes.
-
Customize the Windows Forms DataGrid Control
When I first met the ASP.NET DataGrid control, it was love at first sight. Together we built several applications, taught dozens of classes, published countless articles and tips; we even wrote a book. I can say with no fear of lying that we have an intimate knowledge of each other. When I need the Web DataGrid to perform some rather odd task, I only have to cast a glance (or two, if the task is quite complicated.) With this in mind, I enthusiastically accepted a proposal from one of my clients: Build a Windows Forms application with grid functionalities. Although at the time I had no serious experience with the Windows Forms DataGrid control, I took the gig because I thought a Windows DataGrid works more or less the same as an ASP.NET DataGrid. Next, hardly containing some genuine enthusiasm, I optimistically conjectured it could have been even easier smart controls are handiest compared to HTML markup.
-
Office Server Quirks
Word, Excel and PowerPoint all use VBA, so you would think that using Automation in one should be pretty much like using Automation in another, right? In fact, they do have a lot in common. However, there are a number of subtle differences in the way the servers operate that makes writing generic code tricky.
-
Remote Object Models In .NET
Modern applications are no longer isolated, stand-alone applications, limited to a single process or machine. Distributed applications allow you to put components in close proximity to the resources they use, allow multiple users to access the application, enable scalability and throughput, and increase overall availability and fault isolation. Component-oriented programming is especially geared towards distribution because it is all about breaking the application into a set of interacting components, which you can then distribute to different locations. .NET has a vast infrastructure supporting distributed applications and remote calls. This article focuses on just a single aspect of .NET remoting: the different object activation models available to a distributed application.
-
Scripting SQL Server 2000 Indexes
Adding indexes to tables is the most effective way to optimize your SQL Server query performance. Tables that you query often may require several indexes in order to handle the various search arguments you send. There is one particular situation where indexes on large tables are a hindrance, though. When you're bulk-copying data into the table, it's best to have either no index at all, or just a clustered index. For those situations it is best to use Transact-SQL scripts to remove and add those indexes. In this article you'll learn how to use Transact-SQL stored procedures to generate Transact-SQL indexing scripts that are more robust and less laborious than SQL Server's Enterprise Manager scripting tool.
-
Casting Reference Types in Visual Basic .NET
Casting, or converting the value of a token from one type of data to another is common to most (if not all) programming languages. Visual Basic has long had a series of casting functions, such as CStr, CInt, Clong, etc. to allow conversion of one type of variable to another. While the idea of casting is simple and familiar when discussed in the context of a simple variable containing a value (.NET value types), the meaning and behavior of a cast is less clear when discussed in the context of objects.