Issue: 2003 - January/February

  • 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 i...See More
  • Mike Snell explains Reflection.Emit, a facet of the .NET System.Reflection namespace that lets developers generate new assemblies, modules, types, and MSIL code at run time. The article walks through the practical steps—creating a dynamic assembly, defining a module and type, adding a method, and emitting MSIL with ILGenerator—to build a class and a ReturnSum method without producing high-level source code. Snell then highlights scenarios for runtime code generation and ...See More
  • In this article, Markus Egger explains how to create non-rectangular, shaped Windows Forms using the .NET Framework and Windows Forms package. He demonstrates the use of the GraphicsPath and Region classes to define custom vector-based window shapes, starting with simple elliptical forms and advancing to complex, dynamically changeable shapes inspired by Windows Media Player skins. Egger also addresses challenges such as handling form movement without a title bar and enh...See More
  • 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 proposa...See More
  • 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.
  • 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...See More
  • 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...See More
  • 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 discus...See More