toolbox.cs中的函数变更,可以解决一些闪烁问题,(原来内部控件多了,当出现垂直滚动条与不出现交替时会有闪烁)
没有办法编辑了,就这么发上来吧
程序代码:
protected override void OnSizeChanged(EventArgs e)
{
SendMessage(this.Handle, 11, (IntPtr)0, (IntPtr)0);
base.OnSizeChanged(e);
if (VScroll) {
this.ResetGroupWidth(-21);
}
else {
this.ResetGroupWidth(-4);
}
this.HScroll = false;
SendMessage(this.Handle, 11, (IntPtr)1, (IntPtr)0);
this.Refresh();
}
需导入api:
[DllImport("user32.dll", EntryPoint = "SendMessageA")]
public static extern int SendMessage(IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam);
[
本帖最后由 dingkai19830 于 2009-12-2 09:03 编辑 ]