Control breaks when calling it from another class

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;
 
M

Mattias Sjögren

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top