Control breaks when calling it from another class

  • Thread starter Thread starter JPSutor
  • Start date Start date
J

JPSutor

I am trying to contola progress bar on a form from a method that is
located in annother class.
when I try and instantiate the form
Form1 frm = new Form1;
frm.ProgressBar1.PerformStep();

I get an error message "An unhandled exception of type
'System.StackOverflowException' occurred in WWEmail.exe"
It breaks at this line - Form1 frm = new Form1;
 
Form1 frm = new Form1;

That shouldn't even compile. Please post your actual code.

I get an error message "An unhandled exception of type
'System.StackOverflowException' occurred in WWEmail.exe"
It breaks at this line - Form1 frm = new Form1;

Is this code inside (or in a method called from) a Form1 constructor?


Mattias
 
Back
Top