如何以编程方式向左/向右滚动Windows窗体ListView?
也许可以将SendMessage发送到控件的水平滚动条?
答案 0 :(得分:2)
试试这个
[DllImport("user32")]
static extern IntPtr SendMessage(IntPtr Handle, Int32 msg, IntPtr wParam,
IntPtr lParam);
protected void ScrollH(int pixelsToScroll)
{
const Int32 LVM_FIRST = 0x1000;
const Int32 LVM_SCROLL = LVM_FIRST + 20;
SendMessage(lvwList.Handle, LVM_SCROLL, (IntPtr) pixelsToScroll,
IntPtr.Zero);
}