Jump to content


C# - No overload for 'Form1_Load' ...

  • Please log in to reply
1 reply to this topic

#1 Red0z


    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 07 August 2009 - 02:53 AM

Hey guys, i'm trying to get this to work, but whenever i add 'FormClosingEvent f' to

  public void Form1_Load(object sender, EventArgs e, FormClosingEventArgs f)
  f.Cancel = true;

i get the error 'Error 1 No overload for 'Form1_Load' matches delegate 'System.EventHandler'

So what could the problem be ? 

Do i need to add something to 'this.Load += new System.EventHandler(this.Form1_Load);' ? or what? :)

Thank you in advance!! :)

#2 Demonslay


    P2L Jedi

  • Members
  • PipPipPip
  • 973 posts
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 04 October 2009 - 01:55 PM

I don't do much C#, but I can tell you the error means there isn't a function of that name with those arguments that is meant to be overloaded. To me, it means if you aren't trying to overload a function already defined with the language, then you may be declaring it incorrectly elsewhere. Make sure all types for your arguments match what they should be.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users