devxlogo

Tip Bank

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

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

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

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

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

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

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

Rating your Compiler’s ANSI/ISO Conformance

The following link ranks several popular C++ compilers according to their ANSI/ISO compliance level. The comparison chart contains various features such as exported templates, Runtime Type Information, Koenig lookup, explicit