Control breaks when calling it from another class  
Author Message
Stronzo





PostPosted: Wed Dec 28 11:44:10 CST 2005 Top

Visual C#.Net >> Control breaks when calling it from another class

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;

DotNet455  
 
 
Mattias





PostPosted: Wed Dec 28 11:44:10 CST 2005 Top

Visual C#.Net >> Control breaks when calling it from another class
>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

--

http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.