我有一个继承自PrintPreviewControl
的自定义控件,我有兴趣设计垂直Scroll,所以我做到了:
public class CustomPrintPreviewControl : PrintPreviewControl
{
private const int SB_VERT = 1;
[DllImport("user32.dll")]
static public extern bool ShowScrollBar(System.IntPtr hWnd, int wBar, bool bShow);
public CustomPrintPreviewControl()
{
ShowScrollBar(this.Handle, SB_VERT, true);
}
}
现在我想处理事件 - 如果滚动向上或向下..我怎么能处理向上滚动? 感谢