VBBubble Icon

VBBubble

Add multiline and text alignment support to your VB tooltips

VBBubbleOverview

The sample demonstrates how to add multiline and text alignment support to your VB tooltips. It's done the hard way, by subclassing the tooltip window and handle all the drawing. But the code is encapsulated in a BAS module that can be included in any project, and used by simply adding two function calls. Users familiar with the Windows API can customize the drawing routine to add extra effects.
The code only works on the tooltips provided by VB's Extender object and that is added to all contorls. It will not affect tooltips created internally by controls, such as the ListItem tips in a ListView control.
For an alternative way to create multiline tooltips, based on the control in Comctl32.dll, see the links below.
Details
A VB program will only have one single tooltip window per process. The window has the classname "VBBubble" in the IDE, and "VBBubbleRT5" or "VBBubbleRT6" during runtime, depending on VB version. The window is created the first time the mouse cursor passes over the client area of a Form or UserControl (first WM_MOUSEMOVE message).
While working in the IDE, the tooltip window will not be destroyed as you start and stop the application. The same window will be used until you quit VB.
This sample first uses the EnumThreadWindows function to try to locate an existing tooltip window. If that fails, it sets up a thread CBT hook using SetWindowsHookEx so the application gets notified when a window is created. In any case, when a tooltip window is found, it's subclassed. The module will then handle the WM_WINDOWPOSCHANGING and WM_PAINT messages so that the window is sized and drawn like we want it.
To enable this, call the HookToolTips function in the module. This is normally done sometime during application startup, in Form_Load or Sub Main. You also have to call the UnhookToolTips function before the application ends to remove the subclass. Not doing that might cause the application to crash when closed.

NEW

Fixed some bugs.

VBBubbleInformation

Version
1.0
Date
12.12.08
License
Free
Language
English
File Size
147KB
Category
Operating Systems
Windows XP, 2000, 98, Me
System Requirements
No additional system requirements.
OLELIB.TLB Icon
Contains a lot of interface declarations that are not exposed to VB by Windows
Free
RegSettings Icon
Replacement for VB's native registry functions.
Trial
Karl E. Peterson Flood Icon
Recreates the Paint function for VB, as provided in QuickBasic
Trial
Dynamic PInvoke method calls Icon
Gives you the ability to build and execute code at runtime.
Free
COMRunDll Icon
A simple wrapper that enables COM serversto be called from Rundll32.exe
Free
More
Notepad++ (64-bit) Icon
Take full advantage of highly executable, multi-language, simultaneous text and source code editing.
Free
Notepad++ Icon
Take full advantage of highly executable, multi-language, simultaneous text and source code editing.
Free
NetBeans IDE Icon
Fully-featured Java IDE written completely in Java, with many modules available.
Free
Code to Flow chart generator Icon
Automatic program Flow chart generator:supports Visio,Word,Excel,PowerPoint,bmp
Paid
Sublime Text (64-Bit) Icon
Create and edit commands, text files, macros, and regular expressions.
Demo
Hex Editor Neo Icon
Binary Data and File Data Editing Software Utility. Hex Editor Download
Trial
Notepad++ Portable Icon
Take full advantage of highly executable, multi-language, simultaneous text and source code editing.
Free
HxD Hex Editor Icon
Inspect and edit any file, main memory, or disk/disk image.
Free
More