Quote Originally Posted by AceInfinity View Post
It does appear that the mouse scroll is laggy by a bit. It's only behind by one tick on my scroller though. Somehow it's getting delayed.
Not sure exactly how to fix that but I noticed if you change the RTB smooth scrolling to single line scrolls instead then the mousewheel works much better.

Code:
' add to top of rtbEx.vb,
Private Const EM_SCROLL As Int32 = &HB5
Private Const SB_LINEDOWN As Int32 = 1
Private Const SB_LINEUP As Int32 = 0

' change rtbEx.vb,
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
    ' change mousewheel msgs to scroll one line instead of smooth scrolls.
    If m.Msg = WM_MOUSEWHEEL Then
        m.Msg = EM_SCROLL
        m.LParam = IntPtr.Zero
        If (m.WParam.ToInt32) / 65536 > 0 Then ' wheel direction upward
            m.WParam = CType(SB_LINEUP, IntPtr)
        Else ' wheel direction downward
            m.WParam = CType(SB_LINEDOWN, IntPtr)
        End If
    End If
    
    MyBase.WndProc(m)
    ' detect EM_SCROLL here 
    If m.Msg = WM_VSCROLL OrElse m.Msg = WM_HSCROLL OrElse m.Msg = EM_SCROLL Then
        SendScrollPosMessage(scrollMatchedControl.Handle, EM_SETSCROLLPOS, New IntPtr(0), scrollHandler.getScrollValues(Me.Handle))
    End If

End Sub