1

please mind I'm still a beginner:

I am creating a program with windows forms in c#. However, after i had some sync issues the main form loader does not seam to be working. I checked the code with my limited knowledge but i can't seem to find anything wrong?

Here's the code (mainfrm.designer.cs:1):

...
this.Name = "frm_Main";
this.Load += new System.EventHandler(this.frm_Main_Load);
this.menuStrip1.ResumeLayout(false);
...

And here is my loader (mainfrm.cs)

private void frm_Main_Load(object sender, EventArgs e)
{
Everything i do here does not get executed.
}

Does anyone see the problem?

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
DaBeast
  • 23
  • 9
  • Have you put a breakpoint on `frm_Main_Load`? Based on what you have shown above, this definitely should be executed when the form loads. Bear in mind that the `Load` event only occurs once, and when the form was loaded and not when it is opened or displayed. – Martin Oct 26 '15 at 10:14
  • No breakpoints, However it seems my code does seem to get executed at public frm_Main() { } ? – DaBeast Oct 26 '15 at 11:27
  • 2
    http://stackoverflow.com/a/4934010/17034 – Hans Passant Oct 26 '15 at 12:44
  • Ha yes, you are right! It only happened recently so it must be a update that ran. It works fine if i just run the application without the debugger. – DaBeast Oct 26 '15 at 12:58
  • 1
    Possible duplicate of [VS2010 does not show unhandled exception message in a WinForms Application on a 64-bit version of Windows](http://stackoverflow.com/questions/4933958/vs2010-does-not-show-unhandled-exception-message-in-a-winforms-application-on-a) – Artjom B. Dec 03 '15 at 12:01

1 Answers1

1

This is indeed a bug within Visual Studio, as mentioned by Hans. stackoverflow.com/a/4934010/17034

Community
  • 1
  • 1
DaBeast
  • 23
  • 9