Tip Bank

DevX - Software Development Resource

Proper MouseLeave Detection

I have read many tips about using MouseMove events to create an Explorer-like coolbar look. The problem is that if your button is located close to the main form’s border

DevX - Software Development Resource

Native Registry Access Fails Under MTS

VB provides an easy way to access the Registry with the built-in GetSetting and SaveSetting functions. These functions read and write information to the HKEY_CURRENT_USERSoftwareVB and VBA Program area of

DevX - Software Development Resource

Create Rich, Colorful Text

Call this sub to insert text of any color at the current insert point of a RichTextBox: Private Sub ColorText(rtb As RichTextBox, Color _ As Long, Text As String) Dim

DevX - Software Development Resource

Change the Setup Wizard Background Color

VB6’s Setup Wizard generates gradient blue background screens, as do wizards in previous versions of VB. However, an undocumented setting gives you the opportunity to see installation programs with other

DevX - Software Development Resource

Start up in your Code Folder

I keep all my projects in a particular directory such as C:work. When I save or open up a new project, I want the File dialog box to start at

DevX - Software Development Resource

Use UDTs for Irregular Arrays

If you use variable-length strings and/or dynamic arrays in a user-defined type (UDT), the actual data does not become part of the structure. Instead, four-byte pointers are stored in the

DevX - Software Development Resource

Clear a Masked Edit Box

To blank out the text in a masked edit box, make sure the string you assign uses underscores matching the mask. It’s difficult to maintain code when you have to

DevX - Software Development Resource

Returning a void Expression from a void Function

Examine this code snippet. Will your compiler accept it? void a_func_returning_void();void func(){ return a_func_returning_void(); //returning a value from a void function?} At present, most compilers will not accept this code