devxlogo

The Latest

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

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 net.sf.saxon.om.SequenceIterator and net.sf.saxon.query.QueryResult classes

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.

Working with Red-Black Trees in C#

lthough binary search trees (BSTs) are used widely, as data gets added, binary search trees tend to degenerate into an unordered linked list over time. The “red-black tree” is a

Introducing ADO.NET Entity Framework

he challenge of bringing data from efficient storage engines such as SQL Server into object-oriented programming models is hardly a new one. Most developers address this challenge by writing complex

Drawing with Direct3D, Part 1: Getting Started

irect3D is Microsoft’s high-performance, three-dimensional graphics library. Using Direct3D, you can build amazing scenes containing hundreds or even thousands of three-dimensional shapes, three-dimensional charts and graphs, surfaces that change in

Converting an Integer to a C++ String

Boost libraries provide a better way to convert numbers into strings or vice versa. You must install the Boost libraries on your computer to make this work (click here for

Implement mouseDragged and mouseMove Events

This tip shows you how to implement mouseDragged and mouseMove events for moving components into a frame: import java.awt.*;import java.awt.event.*;class f extends Frame implements MouseMotionListener,MouseListener{Checkbox CB=new Checkbox(“Label”,true);Button BP=new Button(“BUTTON_1”);Button B=new

Catching the (Silver) Light

‘d guess that everyone reading this magazine has heard of Silverlight. I’ll also guess that not everyone has jumped at the opportunity to “play” with something that had been in

Viewing Contents in the Background Form

Suppose you’re working on multiple forms and you’ve got a visual dependency on data in one or more forms (something like the Aero effect in Vista). In such cases, use

Book Excerpt: Advanced AJAX: Architecture and Best Practices

he book Advanced Ajax: Architecture and Best Practices is the definitive guide to building business-critical, production-quality web applications with AJAX. It systematically addresses the design, architecture, and development issues associated

Printing Envelopes, and Lambda Expressions

or those following the saga of my household’s two cross-country moves in nine months back in 2005, I’m sure you’ll be happy to know that the current consensus is that

Re-Igniting Creativity

just got back from San Diego Comic-Con 2007 in San Diego, California. I love Comic Con for a number of reasons. First, I can go with friends and “geek” for

MVP Corner: Perspectives from a .NET Guy at GDC

‘ve been going to major developer conferences for 10 years now. My first was the Microsoft Professional Developers Conference (PDC) in San Diego back in September 1997. Whether I’m speaking

Book Excerpt: Next Generation Java Testing

he book, Next Generation Java Testing: TestNG and Advanced Concepts, provides pragmatic and results-focused approaches that help enterprise Java developers build more robust code for today’s mission-critical environments. Enterprise Java

Solving the 2D Packing Problem

t’s easy to list applications where computers leave humans in the dust. When it comes to complex mathematics, repetitive calculations, and tedious searches, even the most astute mathematician can’t beat

Build Your Own Windows Mobile RSS Reader

ith the recent introduction of the Windows Mobile 6 platforms, we are now beginning to see a proliferation of new devices supporting the Windows Mobile 6 Standard (aka Smartphone). Because

Keep Your Run Menu Open to View Its Output

When you run some commands in the Run Menu, it closes before you can view the output. Here’s a small trick to make the window stay open after the execution

Using the &ltidbag&gt Element in Hibernate

Hibernate’s facility allows you to map many-to-many associations and collections of values to a single table with a surrogate key. The following code shows an example of mapping: &ltidbag name=”cars”

Create Domain-Specific Languages with ANTLR

he concept of Domain-Specific Languages (DSLs) has been around for years, but has recently experienced an uptick in popularity. This is due in large part to the success of Ruby