Thanks Mike
Again you are Master of the Universe O'Great One!
Thanks again
PR
NOTE: Its been one of those weeks
Well you can use AddHandler to dyanmically add an event handler to the child form's FormClosed event when it is created it in the parent. When the event is fired, you can set your member variable back to Nothing. Then in all code where you reference the child form, only use the code if the member variable is not Nothing.
Ok that worked, but any ideas on how to handle closing and re-opening the child form, without issues (Null Refernce problem)?
Or is this an area I'll have to figure out how to do myself?
Thanks,
The problem is how the form is accessed in the sample. In the LoadBunOptimizationForm() method, a new instance of the class frmBunOptimization is created and stored in the local variable named newmdichild_BunOpti. Then in the UltraToolbarsManager1_AfterRibbonTabSelected event handler, the code sets the frmBunOptimization.RibbonTabSelected. It looks like in VB, when you reference an instance property on a class name, they create a new instance of the class, store it as a hidden static variable, and set the property on that instance. So the proeprty was being set on the new instance of frmBunOptimization, not the one created and shown in LoadBunOptimizationForm.
Define a member variable on your mdi parent form named newmdichild_BunOpti, set it in LoadBunOptimizationForm, and then set newmdichild_BunOpti.RibbonTabSelected in the AfterRibbonTabSelected event handler.
Yes it is, and it then the code goes to the property "RibbonTabSelected" and "SetActiveTab", but the Tab is not shown as selected at that point.
I've attached a zip file with my test project for you use.