private void AboutForm_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Cursor.Current = Cursors.SizeAll; NativeMethodsManager.ReleaseCapture(); NativeMethodsManager.SendMessage(Handle, 0xA1, 0x2, 0); } }
public void FakePanel_Scroll(object sender, ScrollEventArgs e) { int pos = NativeMethodsManager.GetScrollPos(fakePanel.Handle, (int)NativeMethodsManager.ScrollBarType.SbVert); pos <<= 16; this.VScroll -= CustomRichTextBox_VScroll; uint par = (uint)NativeMethodsManager.ScrollBarCommands.SB_THUMBPOSITION | (uint)pos; NativeMethodsManager.SendMessage(this.Handle, (int)NativeMethodsManager.Message.WM_VSCROLL, new IntPtr(par), new IntPtr(0)); this.VScroll += CustomRichTextBox_VScroll; }