Hi all,
I have a MainForm, a DialogForm and a MyClass containing most of the methods I use. I have the situation below;
I) on MainForm : I create an instance of MyClass in order to access methods or procedures on MyClass. There is no problem for this.
II) on MyClass : For some methods like Databinding that requires label binding, I think it is better to move this kind of methods to MainForm as they need some components (label, etc) on the MainForm. If I use this kind of methods on MyClass, I have to create MainForm's instance on MyClass that is not seem to be logical. Because in this case there is a ring relations between MainForm and MyClass. So, instead of this, I moved this kind of methods to MainForm. Is that true?
III) On the other hand, I need to access some of the MainForm methods or procedures from DialogForm. But I want to this without creating an instance of MainForm. I have no idea which way to go. So, in this scenario, what should I do? Could you give some examples for the 3 situations above?
BR