Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 21st, 2005, 03:06 AM
Registered User
 
Join Date: Jun 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default EventHandler and GDI+ Function

I am trying to call a GDI+ function:
{private void Enter_Equation(object sender,PaintEventArgs e)
{.....}
when the user clicks a button with the code:
EnterEquation.Click+=new EventHandler(this.Enter_Equation);
However i get an error saying Method'Menu.Enter_Equation(object,System.Windows.F orms.PaintEventArgs)' does not match delegate 'void System.EventHandler(Object,System.EventArgs)'
How do I resolve this?


 
Old June 21st, 2005, 08:02 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

The error you are getting is for mismatch of the signature of the delegates. Make a function that would accept EventArgs as its second argument and assign that as the handler.

Regards
Ankur Verma





Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide on ProgressChange EventHandler of a Browser sachin635 C# 2008 aka C# 3.0 0 September 15th, 2008 04:21 AM
GDI+ Help Dienzo General .NET 0 April 1st, 2007 02:50 PM
Runtime EventHandler monika.vasvani ASP.NET 1.0 and 1.1 Professional 13 December 2nd, 2006 08:21 AM
GDI+ problem pravo_u_raj C# 4 February 16th, 2006 05:27 PM
eventhandler in VBA for Word nesplb Pro VB 6 0 July 30th, 2003 06:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.