
This demo shows how to control the width of a standard list box's text area so its widest string is always visible.
VB's list box control automatically adds a vertical scrollbar when there are too many items to show vertically. The demo detects the vertical scrollbar and includes it in the list box's width.
Inputs
(n/a)
Returns
(n/a)
Side Effects
A desire to do more coding, maybe...? :?)
API Declarations1. GetSystemMetrics (determines user's scrollbar size)
2. GetWindowLong (determines if listbox currently has a scrollbar)