March 2, 2007

Loading an XSL Stylesheet into a Java Application

Often, XML documents specify XSL stylesheets in an xml-stylesheet processing instruction. One easy way to load this stylesheet into a Java application is to use the TransformerFactory.getAssociatedStylesheet method. Though this method requests four arguments, it’s enough to know the name of the XML document (which is the first argument). The

Make a Textbox Display Characters in a Particular Case

Making a textbox display its characters in a particular case (upper, lower, or title) is very easy with the help of the CharacterCasing property, which uses the values of the enum Forms.CharacterCasing. In the following example, CharacterCasing is used to display all typed characters in uppercase: textBox1.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; You

Create #pragma Messages to Reach the Source of a Message

This macro is for use in #pragma messages. It allows you to double-click on an output message and automatically open the file in the editor at the source #pragma message statement: #define STRING2(x) #x#define STRING(x) STRING2(x)#define FILE_LOC __FILE__ “(” STRING(__LINE___) “) : ” Usage: #pragma message(FILE_LOC “Your message here”) When

Driving Sidebar Gadgets with ActiveX and C#

he Windows Sidebar is one of the most striking features of the new Vista desktop. It’s a sort of virtual “desktop appliance” which hosts DHTML applets in Windows Explorer. With Vista and its Sidebar, you can enhance the formerly static Windows desktop with myriad widgets and doodads, appropriately named “Gadgets.”

Find Anything with Vista’s Windows Desktop Search

indows Desktop Search (WDS) 3.0, introduced with Windows Vista, gives your computer fast search capabilities, helping you find your documents, e-mail, music, photos, videos, and other items quickly. Microsoft implemented the search engine that powers WDS 3.0 as a Windows service that’s shared by applications such as Outlook 2007 and

Fast and Flexible Logging with Vista’s Common Log File System

ogging is a vital capability for enterprise-class applications! For example, consider some of the motivations for examining the logs generated by Internet Information Services (IIS): Usability: Which pages are the most popular? Which pages aren’t visitors finding? Reliability and supportability: For how long was the site down? How did traffic

A Programmer’s Exploration of Vista’s User Account Control

ow often have you been cajoled into troubleshooting a performance issue on an older version of Windows, brought up Task Manager and been bewildered by the list of processes running? Did you suggest a reformat, and sheepishly walk away with your engineering credentials slightly tarnished? Windows Vista brings order to

Hosting WCF Services in Windows Activation Service

indows Activation Service (WAS), introduced with Windows Vista, is the new process activation mechanism that ships with IIS 7.0. WAS builds on the existing IIS 6.0 process and hosting models, but is much more powerful because it provides support for other protocols besides HTTP, such as TCP and Named Pipes.

No more posts to show