【发布时间】:2020-02-13 15:19:41
【问题描述】:
我在 Windows 窗体主机中使用 OpenTK GLControl 设置了 WPF 项目...当我将事件绑定到 GLControl 的鼠标事件(MouseDown、MouseWheel 等)时,我无法让它们发挥作用。鼠标在 GLControl 上时完成的任何鼠标输入似乎都不会触发。有没有办法在表单主机内部的 GLControl 上完成鼠标输入?
我在使用 GLControl 加载时绑定事件
glControl1.MouseWheel += glControl1_MouseWheel;
然后创建
private void glControl1_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
{
Console.WriteLine("Do something");
}
【问题讨论】: