HSmartWindowControl 之 鼠标放大缩小图像
this.hSmartWindowControl1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.my_MouseWheel);
private void my_MouseWheel(object sender, MouseEventArgs e)
{
HSmartWindowControl wind = sender as HSmartWindowControl;
if (wind == null)
{
return;
}
System.Drawing.Point pt = this.Location;
int leftBorder = wind.Location.X;
int rightBorder = wind.Location.X + wind.Size.Width;
int topBorder = wind.Location.Y;
int bottomBorder = wind.Location.Y + wind.Size.Height;
if (e.X < leftBorder && e.X < rightBorder && e.Y > topBorder && e.Y < bottomBorder)
{
MouseEventArgs newe = new MouseEventArgs(e.Button, e.Clicks,
e.X - pt.X, e.Y - pt.Y, e.Delta);
wind.HSmartWindowControl_MouseWheel(sender, newe);
}
}

浙公网安备 33010602011771号