|
-
Jan 2nd, 2001, 01:56 PM
#1
Thread Starter
Member
hey..
If I want to fil a listbox with some data, then the listbox start flikkering. Ya know what I mean...
I've seen that there's somekind of
Sendmessage( )
that prevents this flikkering when filling a listbox...
Vb-Addicted
Diederik Van Durme
18/m/Belgium:Kortrijk
-
Jan 4th, 2001, 11:34 AM
#2
PowerPoster
Hi! Ctrack is this you looking for?
Code:
Option Explicit
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 LB_INSERTSTRING = &H181
Private Sub Command1_Click()
Dim i As Long
For i = 0 To 32767
SendMessage List1.hwnd, LB_INSERTSTRING, -1, ByVal CStr("Item " & i)
DoEvents
Next
End Sub
Cheers!
-
Jan 6th, 2001, 08:53 AM
#3
Fanatic Member
You can also use the LockWindowUpdate(List1.hWnd) API. This will prevent the Listbox to redraw every time an item is added. After adding items, use LockWindowUpdate(0&)
-
Jan 6th, 2001, 09:52 AM
#4
PowerPoster
This my first time heard abt this LockWindowUpdate Win32 API function. Thanks Mad )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|