Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Errors with creating custom timer die tick event handler.

Status
Not open for further replies.

WomanPro

Programmer
Nov 1, 2012
180
GR
Is it possible to create a custom TmrDie_Tick event?
I tried this
Public Sub NewPcTmrDie_Tick(ByVal sender As System.Object, ByVal e As EventArgs, ByVal e2 As System.Windows.Forms.MouseEventArgs) Handles PcTmrDie.Tick
....
End Sub
Because I want custom mouse event args with x,y coordinates that's why I use e2 variable. I am getting error BC31029 Method 'NewPcTmrDie_Tick' cannot handle event 'Tick' because they do not have a compatible signature.

Secondly in the form load event I have the following statement
AddHandler PcTmrDie.Tick, AddressOf My.Forms.Backgammon.NewPcTmrDie_Tick
With the following error, Error BC31143 Method 'Public Sub NewPcTmrDie_Tick(sender As Object, e As EventArgs, ByRef e2 As MouseEventArgs)' does not have a signature compatible with delegate 'Delegate Sub EventHandler(sender As Object, e As EventArgs)'.
What am I missing here, is there a way to create my custom timer die tick handler for PcTmrDie.Tick with custom arguments? Any help will be much appreciated. Thank you so much in advanced.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top