create event press mouse.
In frmRemote:
public delegate void RemoteClickHandler(MouseEventArgs e);
public event RemoteClickHandler RemoteClick;
In frmScreen:
public frmScreen(frmRemote remote)
{
InitializeComponent();
remote.Click += new frmRemote.RemoteClickHandler(remote_Click);
}
void remote_Click(MouseEventArgs e){
}
Cannot implicitly convert type 'frmRemote.RemoteClickHandler' to 'System.EventHandler'
I don't understand why it's getting this error.
I think you are doing wrong.
remote.Click += new frmRemote.RemoteClickHandler(remote_Click);
but I think you have to do
remote.RemoteClick += new frmRemote.RemoteClickHandler(remote_Click);
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments