请问Panel面板的滚动条事件是什么?急 我点击System.Windows.Forms.Panel(面板)的滚动条,会触发什么事件?我需要在点击滚动条时做一些处理 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 上wwww.codeproject.com吧。上面有一个ScrollablePanel例子,你照着修改一下,就能实现捕获滚动条的事件了。 public class vscrollBar : System.Windows.Forms.VScrollBar{ public vscrollBar() { }}public class hscrollBar : System.Windows.Forms.HScrollBar{ public hscrollBar() { }}这样简单的继承一下然后加到你想要的地方private vScrollBar vscrollBar;private hScrollBar hscrollBar;this.vscrollBar = new vScrollBar();this.hscrollBar = new hScrollBar();this.vscrollBar.Dock = DockStyle.Right;this.vscrollBar.Location = new Point(336, 0);this.vscrollBar.Name = "vscrollBar";this.vscrollBar.Size = new Size(16, 256);this.hScrollBar.Dock = DockStyle.Bottom;this.hScrollBar.Location = new Point(0, 240);this.hScrollBar.Name = "hScrollBar";this.hScrollBar.Size = new Size(336, 16);this.vscrollBar.Minimum = 0;this.vscrollBar.Value = 0;this.vscrollBar.SmallChange = 20;this.vscrollBar.LargeChange = 20;this.hScrollBar.Minimum = 0;this.hScrollBar.Value = 0;this.hScrollBar.SmallChange = 20;this.hScrollBar.LargeChange = 20;this.vscrollBar.ValueChanged += new EventHandler(VScrollBarValueChanged);this.hScrollBar.ValueChanged += new EventHandler(HScrollBarValueChanged);this.vscrollBar.TabStop = false;this.hScrollBar.TabStop = false;private void VScrollBarValueChanged(object sender, EventArgs e){ //todo}private void HScrollBarValueChanged(object sender, EventArgs e){ //todo} 我是webapp的,那个事件你可以自己改 怎么自动激活需验证邮箱的账户跟获取文本型验证码? C# 的A generic error occurred in GDI+错误,懂的进 如何在word模板中书签位置插入图片 画曲线很慢 问一问关于数据帮定的 如何在程序里修改现有文件的名字啊?? 在线等待:如何限制在文本框中只输入数字,小数点和删除键? #########C#处理图片的问题-----在线等########## 求大神帮助!!有关VS中调用SQL中的无参数的存储过程的奇怪问题 报价反馈系统 一个xml转换成excel的问题 安装IIS的问题大家进来看看,在线等。
{
public vscrollBar()
{
}
}public class hscrollBar : System.Windows.Forms.HScrollBar
{
public hscrollBar()
{
}
}
这样简单的继承一下
然后加到你想要的地方
private vScrollBar vscrollBar;
private hScrollBar hscrollBar;this.vscrollBar = new vScrollBar();
this.hscrollBar = new hScrollBar();
this.vscrollBar.Dock = DockStyle.Right;
this.vscrollBar.Location = new Point(336, 0);
this.vscrollBar.Name = "vscrollBar";
this.vscrollBar.Size = new Size(16, 256);
this.hScrollBar.Dock = DockStyle.Bottom;
this.hScrollBar.Location = new Point(0, 240);
this.hScrollBar.Name = "hScrollBar";
this.hScrollBar.Size = new Size(336, 16);
this.vscrollBar.Minimum = 0;
this.vscrollBar.Value = 0;
this.vscrollBar.SmallChange = 20;
this.vscrollBar.LargeChange = 20;
this.hScrollBar.Minimum = 0;
this.hScrollBar.Value = 0;
this.hScrollBar.SmallChange = 20;
this.hScrollBar.LargeChange = 20;
this.vscrollBar.ValueChanged += new EventHandler(VScrollBarValueChanged);
this.hScrollBar.ValueChanged += new EventHandler(HScrollBarValueChanged);
this.vscrollBar.TabStop = false;
this.hScrollBar.TabStop = false;private void VScrollBarValueChanged(object sender, EventArgs e)
{
//todo
}private void HScrollBarValueChanged(object sender, EventArgs e)
{
//todo
}