Tips Index


Click for Convert a Character Code to a string describing the Keyboard Keys which must be pressed

Convert a Character Code to a string describing the Keyboard Keys which must be pressed

Different keyboard layouts use different virtual key codes and shift combinations to represent character codes. This tip demonstrates how to convert a key code into the equivalent virtual key code and shift state, as well as how to provide the name of a virtual key on the keyboard.

  more...


Last Updated: 27 June 2003


Click for Text Box Balloon tip support in XP

Text Box Balloon tip support in XP

This tip demonstrates how to to use the new Balloon Tip support provided for TextBoxes under XP. Cue Banners may also work, but only if you don't have multiple language support installed.

  more...


Last Updated: 26 June 2003


Click for Create a VB Picture from a GDI Picture Handle

Create a VB Picture from a GDI Picture Handle

This tip shows you how create a VB Picture object from an GDI bitmap handle (hBitmap). This is useful if you are trying to provide VB users with a picture they can use from a GDI class.

  more...


Last Updated: 28 March 2003


Click for Blend Two Colours Together Using Alpha

Blend Two Colours Together Using Alpha

If you're not using GDI+ for drawing, then there isn't an easy way to determine what colour you would get if you blended two colours together with a specified alpha amount. This article provides a routine that allows you to do it using straight VB code.

  more...


Last Updated: 28 March 2003


Click for Moving, Clicking and Tracking the MousePointer in Code

Moving, Clicking and Tracking the MousePointer in Code

VB doesn't provide any way to determine where the mouse is regardless of which control its over. Neither does it allow you to move the cursor or emulate mouse clicks on objects. This tip provides a simple class which uses API functions to add this functionality.

  more...


Last Updated: 7 January 2003


Click for Add File or URL AutoCompletion to TextBoxes and ComboBoxes

Add File or URL AutoCompletion to TextBoxes and ComboBoxes

Demonstrates how to add File System and/or URL AutoCompletion to a TextBox or Combo Box, using the same code used for the System Common Dialog file name, Start->Run dialog box and IE Address bar. Note that IE5 or above is required to use this function.

  more...


Last Updated: 7 January 2003


Click for Create New GUIDs

Create New GUIDs

This sample, from Dion Wiggins (dionwiggins@hotmail.com) shows how to use the CoCreateGuid and StringFromGUID2 functions to create a GUID.

The code is compiled into an ActiveX DLL which gives the interesting possibility of using the code from an ASP page, or from other ActiveX-enabled scripting tools.

  more...


Last Updated: 15 November 1999


Click for Copy the entire contents of a PictureBox to the clipboard

Copy the entire contents of a PictureBox to the clipboard

VB does not allow you to copy the full picture of a Form, UserControl or PictureBox to the clipboard. If you use Clipboard.SetData, it only copies a bitmap loaded into these objects. You can get around this limitation and ensure the entire contents are copied, including any graphics you have drawn, by using API methods.

  more...


Last Updated: 18 September 1999


Click for Text Box control - adding Cut, Copy, Paste, Undo and Delete command support

Text Box control - adding Cut, Copy, Paste, Undo and Delete command support

This tip demonstrates how to simply add Cut/Copy/Paste and Undo support to a Visual Basic TextBox.

  more...


Last Updated: 18 August 1999


Click for Generating Long Sequences of Unique Numbers

Generating Long Sequences of Unique Numbers

Sometimes it is very useful to be able to generate a long sequence of unique numbers. This tip provides a method to generate long sequences which are not consecutive by using a shift register approach.

  more...


Last Updated: 18 August 1999