Tip Bank

DevX - Software Development Resource

HTTP Authorization Using Java

Many programmers like to use Java to automate access to network resources because it is so easy to write networking code with the Java networking classes. Accessing URLs through Java

DevX - Software Development Resource

Fetch Contents of URL

The Java core API provides classes in the java.net package to handle basic networking functions. The URL class represents a pointer to a network resource, like the actual address. The

DevX - Software Development Resource

Play WAV Sounds from Resource Files

Everyone loves a good sound bite. You can use the PlaySound() function in the Windows Multimedia DLL (WINMM.DLL) to play a wave (WAV) file that is stored as a resource.

DevX - Software Development Resource

Display Tooltips

You can easily duplicate the tooltips that appear when you float the mouse over a button in Microsoft’s products. This code displays the tooltip in the lower right-hand corner of

DevX - Software Development Resource

Random Values Without Duplicates

This code produces a “random” sequence of integers between specified Lower and Upper values without duplication. On the first call to the Shuffle routine with new values for Upper and

DevX - Software Development Resource

Change Display Settings on the Fly

When writing a game for Windows 95, set the display resolution to 640-by-480, set the color palette to True Color when it runs, and restore it to its initial mode

DevX - Software Development Resource

Comment Multiple Lines

VB provides only single-line comment functions: “REM” and “‘”. If you’re looking for another way to comment out a block of code, use conditional compilation in VB4 instead. Define “COMMENT

DevX - Software Development Resource

Write Less CPU-Bound Animations

When doing animation, such as scrolling a label or using picture boxes, I first used the method described by Eric Bernatchez (“Smoother Control Animation,” “101 Tech Tips for VB Developers,”

DevX - Software Development Resource

Use Subscripts and Superscripts

You can use subscripts and superscripts in a RichTextBox control. To prevent the control from truncating text that is raised or lowered too far, reduce the characters’ size accordingly: Private