Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, November 25, 2011 5:21 PM
Hi Everyone,
I have an error message when I try to run my program, this is error CS1061 like show below. But actually my program is success full to run before.. But I don't know why suddenly when I try to compile there's any error :
Build started: Project: Latihan1, Configuration: Debug x86
c:\users\lina\documents\visual studio 2010\Projects\Latihan1\Latihan1\Form1.Designer.cs(40,55): error CS1061: 'Latihan1.Form1' does not contain a definition for 'Form1_Load' and no extension method 'Form1_Load' accepting a first argument of type 'Latihan1.Form1' could be found (are you missing a using directive or an assembly reference?)
Compile complete -- 1 errors, 0 warnings
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
All replies (8)
Friday, November 25, 2011 9:01 PM ✅Answered | 6 votes
It looks like you accidentally created a form Load event handler, then deleted it from code, but not the designer. To fix:
Open up your form in the designer, and go to the events in the properties page. Delete the "Form1_Load" event on the form's Load...
Reed Copsey, Jr. - http://reedcopsey.com
If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
Friday, November 25, 2011 7:07 PM
The compiler can't see the method Form1_Load.
Perhaps you made some ortografic mistake or in the generated code there's a reference to that method.
See more about the error itself in Error CS1061.
João Miguel
Saturday, November 26, 2011 3:55 AM
Hi Reed,
Thanks for the reply, I've tried as your suggest. No error, but looks that the run result is wrong..
Like there's any some function doesn't work..
Saturday, November 26, 2011 6:25 AM
Hi Reed,
I think you right.. thanks for solving..
Wednesday, December 7, 2011 4:33 AM
Hi thankyoueveryday,
I'm glad to hear that you got it working. If you have any difficulty in future programming, we welcome you to post here again.
Bob Shen [MSFT]
MSDN Community Support | Feedback to us
Saturday, January 11, 2014 2:18 PM
hii i am having the same problem , is it possible if you say more clearer or screenshots of the solution please. I am at properties window and i don't know to do already. Thanks:)
Monday, January 13, 2014 10:50 PM
In the properties window, at the top, you should see a little lightning bolt. Click that and then find the Load event and clear it out:
Thursday, February 21, 2019 8:14 PM
Thanks I always accidentally click items. This is going to save me many hours knowing to look there. So grateful!!