对FlowLayoutPanel添加鼠标滚轮事件
在mainform中添加事件
his.flowLayoutPanel1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.flowLayoutPanel1_MouseWheel);
添加滚轮事件函数:
private void flowLayoutPanel1_MouseWheel(object sender, MouseEventArgs e) { if (!(flowLayoutPanel1.VerticalScroll.Visible == false || (flowLayoutPanel1.VerticalScroll.Value == 0 && e.Delta > 0) || (flowLayoutPanel1.VerticalScroll.Value == lastRightPanelVerticalScrollValue &&