Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
The attached code contains a class that can be use
Author:
10Tec Company
E-mail:
Click to e-mail author
Website:
http://www.10Tec.com/
Submitted:
3/8/2003
Version:
VB4
Compatibility:
VB4, VB5, VB6
Category:
Controls
Downloads:
6976
The attached code contains a class that can be used to add items to the ListBox control. When you add a new item, it adds a horizontal scroll bar to a specified list box (if required) and scrolls down the list box so you can see the last added item. The code uses the SendMessage API function to add a horizontal scroll bar dynamically to a list box using the LB_SETHORIZONTALEXTENT message; it also takes into account the width of the vertical scroll bar that can be present in the list box. To precisely calculate the width of a new item, our class uses the TextWidth method of the form that contains the specified list box. This means that the list box must use the same font as the form. Using of this class called CLBHscroll in real-world applications is very easy. All you need to do is (1) to initialize this class using the Init method which accepts the reference to the list box you want to populate and (2) call the AddItem method of this class to add a new item. The Init method also clears the list box. The attached can be useful in many real-world situations. For instance, if you perform context search in files, you can use this class to add to a list box at the screen found files as they are found. Our company uses this code in demo applications of the xDir library that allows you to enumerate files and folders in a specified folder and all of its subfolders using various filter criteria (file and folder mask; file size; attributes; date and time of creation, last access and modification, etc.) You can visit our Web-site (www.10Tec.com) to download this and other demos to see how it works.
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement