• Log in or sign up for an account here: https://www.sythe.org/login

Listbox help

htaed

Forum Addict

Banned
Joined
Dec 19, 2005
Sythe Gold
0
Messages
336
Age
38
Location
Anchorage, Alaska
Well i am just messing around with a few things, and when trying to make a log using the listbox, is there a way of it keeping scrolled to the latest item added to it?
 
API's & Constants needed:
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_VSCROLL = &H115
Private Const SB_BOTTOM = 7

You will need to add this in the event where data gets added into your list box:
Code:
Call SendMessage(ListBox1.hWnd, WM_VSCROLL, SB_BOTTOM, Null)
 
Of, if you don't wanna use API calls...

Code:
ListBox1.ListIndex = ListBox1.ListCount - 1
 
Runescape Gamblingrunescape gambling
Back
Top