devxlogo

Tip Bank

Clear All Occurences of Extra White Space

This function clears all occurences of extra white space (spaces, tabs, blank lines) and programming comments beginning with ‘;’ in a file and saves the cleaned file as another file.

Recursive Function Finds a Control on a Form

This recursive function finds a control on a form by its name. //written in C#/// &ltsummary&gt///Recursive function to find control on the form by its name/// private Control _co;private Control

Make a Picture’s Background Transparent

If you have images that are supposed to have transparent portions, but have lost the transparency information, you can use Microsoft Word to restore the transparent color. First, paste the

Constrain an HTML Input Box to Uppercase

The easiest way to constrain an HTML input box to uppercase is to use the STYLE attribute inside the INPUT tag. Suppose you have the following code: &ltinput type=”text” name=”big”

Create XMLSchema DataTypes Direct from Java

This tip shows you how to create XMLSchema datatypes direct from Java, using the javax.xml.datatype.* package. In this example you’ll create a Duration object (xs:duration in XMLSchema) and a XMLGregorianCalendar

An Easy Way to Find All Open Forms in VB.NET

It’s really simple to determine whether a form is open?simply use My.Application and My.Forms in .NET: Dim frm As Form For Each frm In My.Application.OpenForms If frm Is My.Forms.TheFormINeed Then

Call a Java Method from XQuery

This tip shows you how to develop XQuery queries that may call any other method. The method called in this tip is java.lang.Math.random: declare namespace m=”java:java.lang.Math”;let $r:=m:random()return $r