Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Integer, _
ByVal wMsg As Integer, _
ByVal wParam As Integer,
ByVal lParam As Integer) As Integer
Private Const WM_SETREDRAW As Integer = 11
' Extension methods for Control
Public Sub ResumeDrawing(ByVal Target As Control, ByVal Redraw As Boolean)
SendMessage(Target.Handle, WM_SETREDRAW, 1, 0)
If Redraw Then
Public Sub SuspendDrawing(ByVal Target As Control)
SendMessage(Target.Handle, WM_SETREDRAW, 0, 0)
Public Sub ResumeDrawing(ByVal Target As Control)
I found these on the web.
Might work for you.
Control I retrieved from a combo box using .control
Sorry Jacob for my late reaction, regarding my 'code project' I focused on other challenges and was almost forgotten this one.
Regarding your suggestions, the problem(flickering ComboBox) occurs only when 'ComboBox.AutoCompleteSource = AutoCompleteSource.ListItems' is called, there is no problem when the items are added with for example 'ComboBox.Items.AddRange(System.IO.File.ReadAllLines(path))'.
Do you think your suggested code is still valid given the above?
Apart from that, for now I do not have enough experience how to implement the examples you provided.
Maybe you can send me a little more in the right direction, I would really appreciate it.
I have no idea. As stated above, I got that off of the internet.
Just try it out.
I'm gonna try Jacob, thanks.