Visual Studio says my build was successful yet my program crashes after one minute

ReiSixx9

Member
Joined
Dec 11, 2016
Messages
14
Programming Experience
Beginner
I've debugged my c# code multiple times and reviewed the results to fix my code. I have fixed every error until there were no more. I built my program, but then when I went to start it it just sat there for a minute and crashed. I have no idea what's wrong with my code. Can someone please help me?
I'm using Visual Studio 2017. Also, my program is supposed to take screenshots every 30 seconds and then save them to a folder on the C drive called SysApp.

Code (sorry I couldn't figure out how to wrap the code):
http://ideone.com/Y87Kjx

[FONT=&quot]

[/FONT]

[FONT=&quot][/FONT]
[FONT=&quot]

[/FONT]

[FONT=&quot][/FONT]
 
Just please be sure to post only relevant code. For a start, have you debugged your code? Have you placed breakpoints in important places to see whether execution actually reaches those points? That would include the Load event handler of the form. If you are doing something every 30 seconds then I would hope that that means that you're using a Timer. Have you place a breakpoint of the Tick or Elapsed event handler of that?
 
Back
Top Bottom