VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Listbox resize demo

by Andy Fielding (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

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)
Code Returns
(n/a)
Side Effects
A desire to do more coding, maybe...? :?)
API Declarations
1. GetSystemMetrics (determines user's scrollbar size)
2. GetWindowLong (determines if listbox currently has a scrollbar)

Rate Listbox resize demo

Download Listbox resize demo

Download Listbox resize demo (4 KB)

Listbox resize demo Comments

No comments have been posted about Listbox resize demo. Why not be the first to post a comment about Listbox resize demo.

Post your comment

Subject:
Message:
0/1000 characters