public class win32API
{
[DllImport("user32.dll")]
public static extern int ScrollDC(int hdc, int dx, int dy, ref Rectangle lprcScroll, ref Rectangle lprcClip, int hrgnUpdate, ref Rectangle lprcUpdate);
}private void button1_Click_1(object sender, EventArgs e)
{
Rectangle lprcScroll = new Rectangle(0,0,800,300);
Rectangle lprcClip = new Rectangle(0, 0, 800, 600);
Rectangle lprcUpdate = new Rectangle(0, 0, 0, 0);
win32API.ScrollDC(this.Handle.ToInt32(), 0, -600, ref lprcScroll, ref lprcClip, 0, ref lprcUpdate);
}
编译没有问题, 为什么看不到效果呢?
{
[DllImport("user32.dll")]
public static extern int ScrollDC(int hdc, int dx, int dy, ref Rectangle lprcScroll, ref Rectangle lprcClip, int hrgnUpdate, ref Rectangle lprcUpdate);
}private void button1_Click_1(object sender, EventArgs e)
{
Rectangle lprcScroll = new Rectangle(0,0,800,300);
Rectangle lprcClip = new Rectangle(0, 0, 800, 600);
Rectangle lprcUpdate = new Rectangle(0, 0, 0, 0);
win32API.ScrollDC(this.Handle.ToInt32(), 0, -600, ref lprcScroll, ref lprcClip, 0, ref lprcUpdate);
}
编译没有问题, 为什么看不到效果呢?
做一个看板,想实现2到3个页面的轮流滚动效果.