|
-
May 3rd, 2004, 12:04 PM
#1
Flicker in MSChart and List view
I have a program that was originally written in VB6. It contains several graphing windows that utilize MSChart along with some list view windows.
As we all know both of these controls "Flicker" when they update.
Does anyone know of a solution for either, or both, of these controls to make the update draw smoothly without flickering?
A replacement OCX or something would be okay as well.
Thanks in advance,
Jordan
-
May 3rd, 2004, 03:56 PM
#2
I would suggest using the LockWindowUpdate API.
Code:
Option Explicit
Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
Private Sub Command1_Click()
Dim iCount As Integer
LockWindowUpdate Me.List1.hWnd ' Pass the handle of the control to Lock
' this will prevent the contorl from being updated
' thus, removing the flicker
Do Until iCount = 10000
Me.List1.AddItem Format$(iCount)
iCount = iCount + 1
Loop
LockWindowUpdate 0 ' Un lock the control
End Sub
Last edited by DinoVaught; May 3rd, 2004 at 04:06 PM.
-
May 3rd, 2004, 10:26 PM
#3
recently, i was using list view and tree view, they are so slow when handling huge data. this is happened because everytime we update the list, redraw method is fired and this is time-consuming. i try to set visible to FALSE before batch update and set it back to TRUE after the update process has completed and the result is quiet good.
Happy Coding
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
|