devxlogo

Visual Basic

Cache Properties for Repeated References

If you have to reference a control’s property repeatedly, it’s better to assign the property to a temporary variable, then use that variable. This technique is called property caching. For

Extract Red,Green,Blue components of a color

If you have a 32-bit color value in RGB format, you can extract its Red, Green and Blue components using the following routines: Function GetRed(ByVal lColor As Long) As Long

Display Contents of ADODB.Errors Collection

When ADO encounters an error, the Errors Collectionis filled with certain specific details on the causeof the error. You can check the Errors collection ofthe Connection object whenever you encounter

Perform Faster String Manipulations

Are you dealing with strings you have to parse if you want to drop one special character or change it into another? Keep this trick in mind. Even though this

Create Better Button Arrows

Many times developers use a form’s default font arrow characters for To and From buttons between listboxes. To give your app a nicer, more solid look, do what Microsoft does-use