HSmartWindowControl 之 鼠标放大缩小图像
this.hSmartWindowControl1.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.my_MouseWheel);
private void my_MouseWheel(object sender, MouseEventArgs e)
{
System.Drawing.Point pt = this.Location;
int leftBorder = hSmartWindowControl1.Location.X;
int rightBorder = hSmartWindowControl1.Location.X + hSmartWindowControl1.Size.Width;
int topBorder = hSmartWindowControl1.Location.Y;
int bottomBorder = hSmartWindowControl1.Location.Y + hSmartWindowControl1.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);
hSmartWindowControl1.HSmartWindowControl_MouseWheel(sender, newe);
}
}