I'm not sure if I have understood, but maybe you can send WM_VSCROLL to the RTB
I did a test on MouseWheel of a PictureBox =>
pictureBox1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseWheel);
then
private void pictureBox1_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
{
int nNbLines = e.Delta * SystemInformation.MouseWheelScrollLines / 120;
if (nNbLines > 0)
{
for (int i = 0; i<nNbLines; i++)
SendMessage(richTextBox1.Handle, WM_VSCROLL, (int)MakeWord(SB_LINEUP, 0), IntPtr.Zero);
}
else
{
for (int i = nNbLines; i < 0; i++)
SendMessage(richTextBox1.Handle, WM_VSCROLL, (int)MakeWord(SB_LINEDOWN, 0), IntPtr.Zero);
}
}
with declarations :
[DllImport("User32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern int SendMessage(IntPtr hWnd, uint msg, int wParam, IntPtr lParam);
public const int WM_VSCROLL = 0x0115;
public const int SB_LINEUP = 0;
public const int SB_LINELEFT = 0;
public const int SB_LINEDOWN = 1;
public const int SB_LINERIGHT = 1;
public const int SB_PAGEUP = 2;
public const int SB_PAGELEFT = 2;
public const int SB_PAGEDOWN = 3;
public const int SB_PAGERIGHT = 3;
public const int SB_THUMBPOSITION = 4;
public const int SB_THUMBTRACK = 5;
public const int SB_TOP = 6;
public const int SB_LEFT = 6;
public const int SB_BOTTOM = 7;
public const int SB_RIGHT = 7;
public const int SB_ENDSCROLL = 8;
public static uint MakeWord(byte low, byte high)
{
return ((uint)high << 8) | low;
}