I need to return values from open window to user object without close current window
I have user object hold datawindow , i need to open other window to search on it and make some operation then insert in开发者_开发问答 datawindow on user object without close window.
I think of two possibilities :
Direct access (quick and dirty) :
- You could open the second window with
OpenWithParm()
and give the datawindow as argument. - In the
open()
event of that second window, you can get that datawindow viaMessage.PowerobjectParm
- insert what you need to in the given DW.
Better way (decoupling the process and the GUI) :
- add a dedicated method to the first window that accesses directly the DW
- use
OpenWithParm()
withthis
as argument to let the second window who is calling it - get the caller with the
Message.PowerobjectParm
- call the dedicated method of the caller to add data into the DW
精彩评论