devxlogo

Visual Basic

Image

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

Image

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

Image

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

Image

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

Image

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