December 12, 2007

Resuscitate Your .NET Programs with the Application Recovery and Restart API

icrosoft has gone to great lengths to help you make your software applications more appealing to users. You can create rich user experiences with Windows Presentation Foundation, smooth web applications with ASP.NET AJAX, data friendly applications with LINQ, and much more. But when it comes to appeal, nothing beats an

Setting Focus on a Form in an MDI Application

To gain focus on a form in an MDI Windows Application quickly, use the Form.Activate method. This method moves the form to the front of the application and gives it focus. If you use this method on an inactive application minimized to the taskbar, it causes the application to flash

Wrap the Result of an XQuery Query into an XML Document

Wrapping the result of an XQuery query into an XML document is very useful if you’re working with atomic values. The following Java program uses the and net.sf.saxon.query.QueryResult classes to do this: /*The resulted document : C:Data_Localxmldocswrap.xml*///Javaimport;import;import;import java.util.Properties;import javax.xml.transform.OutputKeys;import;//Saxonimport;import net.sf.saxon.query.QueryResult;import;import net.sf.saxon.Configuration;import net.sf.saxon.query.DynamicQueryContext;import net.sf.saxon.query.StaticQueryContext;import

An Improved szEncryptDecrypt VB6 Funtion

This is an improvement to the tip “Encrypt a String Easily.” I found that the szEncryptDecrypt function in this tip did not handle unicode strings properly, but otherwise worked well. The changes in the following version should work for any string by explicitly converting each character to ASCII and back.