Hi everybody,
I have a most peculiar problem. I'm running my forms in screen from the menu. All my forms are classes and called with RunOneInstanceForm function.
This function checks if the form class was already instantiated and if it was, it activates the existing form, otherwise it calls the DoForm function which creates an instance of the class and calls its Show() method.
Now, I have a form with a pageframe. The first time I call this form from the menu, everything is good. I hit Print button on the toolbar, then close the form.
The next time I call this form from the menu (and the form was properly released, AFAIK no dangling references and it's not in _screen forms collection) the form comes without a focus.
I'm not sure what's causing this strange problem and how to remedy it.
Anybody has this problem before?
Appreciate your help in advance.
If it's not broken, fix it until it is.
My Blog