Cannot implicitly convert type 'frmRemote.RemoteClickHandler' to 'System.EventHandler'

daniel

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.

dotnetstep

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cannot implicitly convert type 'void' to 'System.Threading.Tasks.Task'

From Dev

Cannot implicitly convert type System.EventHandler to System.EventHandler<object> error

From Dev

Cannot implicitly convert type to 'System.Collections.Generic.List

From Dev

Linq Cannot implicitly convert type

From Dev

Cannot implicitly convert type 'System.Collections.Generic.List

From Dev

cannot implicitly convert type in LINQ

From Dev

Cannot implicitly convert type 'string' to 'System.Windows.Forms.TextBox'

From Dev

Cannot implicitly convert type 'System.Linq.IQueryable?

From Dev

Cannot implicitly convert type 'System.EventHandler' to 'System.Windows.RoutedEventHandler' in c#

From Dev

Cannot implicitly convert to type string to System.Net.Mail.MailAddress

From Dev

Cannot implicitly convert type 'int' to 'System.Data.DataTable'

From Dev

cannot implicitly convert System.Type to object

From Dev

Cannot implicitly convert type 'void' to 'System.Net.CookieContainer'

From Dev

Cannot implicitly convert type 'void' to System.Windows.Forms.MouseEventHandler

From Dev

Cannot implicitly convert type System.Collections.Generic.List

From Dev

Cannot implicitly convert type DbSet

From Dev

Cannot implicitly convert type ('string', 'string') to System.Net.ICredentialsByHost

From Dev

Linq Cannot implicitly convert type

From Dev

Cannot implicitly convert type 'string' to 'System.Windows.Forms.TextBox'

From Dev

Cannot implicitly convert type 'System.Linq.IQueryable

From Dev

Cannot implicitly convert type 'System.Collections.Generic.List' to 'string'

From Dev

2 errors - Cannot implicitly convert type system.collection.generic.list<float> to float and cannot implicitly convert type float [] to float

From Dev

Cannot implicitly convert type 'System.Collections.Generic.IEnumerable

From Dev

Cannot implicitly convert type 'frmRemote.RemoteClickHandler' to 'System.EventHandler'

From Dev

Cannot implicitly convert type 'bool' to 'System.Threading.Tasks.Task'

From Dev

Error Cannot implicitly convert type 'string' to 'System.DateTime' on return

From Dev

Cannot implicitly convert type 'System.Linq.IQueryable<char[]>' to 'string[]'

From Dev

Cannot implicitly convert type string to System.Drawing.Color

From Dev

Cannot implicitly convert anonymous type to System.Collections.Generic.List

Related Related

  1. 1

    Cannot implicitly convert type 'void' to 'System.Threading.Tasks.Task'

  2. 2

    Cannot implicitly convert type System.EventHandler to System.EventHandler<object> error

  3. 3

    Cannot implicitly convert type to 'System.Collections.Generic.List

  4. 4

    Linq Cannot implicitly convert type

  5. 5

    Cannot implicitly convert type 'System.Collections.Generic.List

  6. 6

    cannot implicitly convert type in LINQ

  7. 7

    Cannot implicitly convert type 'string' to 'System.Windows.Forms.TextBox'

  8. 8

    Cannot implicitly convert type 'System.Linq.IQueryable?

  9. 9

    Cannot implicitly convert type 'System.EventHandler' to 'System.Windows.RoutedEventHandler' in c#

  10. 10

    Cannot implicitly convert to type string to System.Net.Mail.MailAddress

  11. 11

    Cannot implicitly convert type 'int' to 'System.Data.DataTable'

  12. 12

    cannot implicitly convert System.Type to object

  13. 13

    Cannot implicitly convert type 'void' to 'System.Net.CookieContainer'

  14. 14

    Cannot implicitly convert type 'void' to System.Windows.Forms.MouseEventHandler

  15. 15

    Cannot implicitly convert type System.Collections.Generic.List

  16. 16

    Cannot implicitly convert type DbSet

  17. 17

    Cannot implicitly convert type ('string', 'string') to System.Net.ICredentialsByHost

  18. 18

    Linq Cannot implicitly convert type

  19. 19

    Cannot implicitly convert type 'string' to 'System.Windows.Forms.TextBox'

  20. 20

    Cannot implicitly convert type 'System.Linq.IQueryable

  21. 21

    Cannot implicitly convert type 'System.Collections.Generic.List' to 'string'

  22. 22

    2 errors - Cannot implicitly convert type system.collection.generic.list<float> to float and cannot implicitly convert type float [] to float

  23. 23

    Cannot implicitly convert type 'System.Collections.Generic.IEnumerable

  24. 24

    Cannot implicitly convert type 'frmRemote.RemoteClickHandler' to 'System.EventHandler'

  25. 25

    Cannot implicitly convert type 'bool' to 'System.Threading.Tasks.Task'

  26. 26

    Error Cannot implicitly convert type 'string' to 'System.DateTime' on return

  27. 27

    Cannot implicitly convert type 'System.Linq.IQueryable<char[]>' to 'string[]'

  28. 28

    Cannot implicitly convert type string to System.Drawing.Color

  29. 29

    Cannot implicitly convert anonymous type to System.Collections.Generic.List

HotTag

Archive