我有一张图表,其中有一个带有 x 轴 y 轴的图表区域。首先,我必须将其设置为可缩放,
chart1.ChartAreas[0].AxisY.ScaleView.Zoomable = true;
chart1.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
Run Code Online (Sandbox Code Playgroud)
默认情况下,如果我使用鼠标选择一个矩形区域,图表将缩放到所选区域。但这很烦人,因为它容易误操作。但如果我这样做:
chart1.ChartAreas[0].AxisY.ScaleView.Zoomable = false;
chart1.ChartAreas[0].AxisX.ScaleView.Zoomable = false;
Run Code Online (Sandbox Code Playgroud)
即使我打电话,Axes 也不会缩放
chart1.ChartAreas[0].AxisX.ScaleView.Zoom(a, b);
Run Code Online (Sandbox Code Playgroud)
所以,我希望图表区域可缩放,但我不喜欢鼠标选择功能。
我找到了一个方法,
void chart1_SelectionRangeChanged(object sender, CursorEventArgs e)
Run Code Online (Sandbox Code Playgroud)
似乎当我选择一个新区域时,会调用此方法,但并不意味着要覆盖它。我能做什么?谢谢!
我不知道哪个软件做到了这一点,但我的鼠标滚动速度不断地更改为“1”,在我将其设置为“3”后,也许一个小时后,它再次重置为“1”,这使得浏览代码或网页相当不方便。
我不想太频繁地进入控制面板→鼠标。那么我怎样才能在命令行上做到这一点呢?
我希望我的应用程序响应左箭头和右箭头键.所以我写了
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
Run Code Online (Sandbox Code Playgroud)
当我单击键盘左侧的Ctrl时,将调用此函数,并且keyData的值为
keyData = LButton | ShiftKey | Control
Run Code Online (Sandbox Code Playgroud)
这是为什么?
谢谢!
c# ×2
winforms ×2
android ×1
batch-file ×1
command-line ×1
mouse ×1
windows ×1
windows-7 ×1
zooming ×1