|
-
Feb 25th, 2025, 09:44 AM
#11
Re: CommonControls (Replacement of the MS common controls)
 Originally Posted by Karl77
I have a kind of 'solution'.
In the ListBoxW source, I added a DoEvents on WM_KILLFOCUS:
Code:
Private Function WindowProcControl(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Select Case wMsg
Case WM_SETFOCUS
If wParam <> UserControl.hWnd Then SetFocusAPI UserControl.hWnd: Exit Function
Call ActivateIPAO(Me)
Case WM_KILLFOCUS
Debug.Print "WM_KILLFOCUS"
DoEvents
Call DeActivateIPAO
Case ...
This fixes the flickering completely.
I'm not sure yet if there are side effects from this addition.
Later:
I don't feel fine with the DoEvents.
So I tried this:
Code:
Case WM_KILLFOCUS
Debug.Print "WM_KILLFOCUS"
Call DeActivateIPAO
Exit Function
Exit Function cures the flicker as well.
It is also happening "sometimes" in the VB6 ListBox when using visual styles. So, I get the feeling that this is something to do with the underlying API window class and not specific with VBCCR.
Of course when somebody can provide a clever solution it would be good. To just cancel out WM_KILLFOCUS sounds like getting side-effects.
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
|