new System.Windows.Forms.MouseEventHandler(this.eventFunction)
上面发送'object sender'和'MouseEventArgs e'给我的事件函数。我需要发送另一个对象,但如果我使用:创建自定义事件处理程序需要帮助
System.Windows.Forms.MouseEventHandler(this.eventFunction(object, MouseEventArgs, objectINeed));
它不起作用。它只是说有一个无效的论点。即使我公然向它发送一个对象MouseEventArgs对象。
任何人都可以提供任何见解吗?
你想传递什么对象? –
http://www.switchonthecode.com/tutorials/csharp-snippet-tutorial-custom-event-handlers –
但是,我认为你应该能够从'MouseEventArgs'或'EventArgs'继承并创建你自己的。 – IAbstract