repkin05

repkin05

  • NA
  • 10
  • 0

Object Creating Problem

May 8 2004 7:12 AM
I have two class Form1 and component1. I want to creat Form1 object in component1 class and component1 object in Form1 class. If I do that like this private Component1 objComponent = new Component1(); on Form1 class and private Form1 objForm1 = new Form1(); on Component1 class the program is crashing. How can I fix this problem. They need to be accessable from each class to the other class.I have to pass Form1 as a parameter to the Component1 constructor and I have to store it in the Component1 class. But I cant solve this problem. If you know how can I solve this problem can you explain it in codes. Thanks for your help.

Answers (1)