المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Sending Data from one form to another.



C# Programming
08-26-2009, 11:51 AM
Hi!!!
i need to pass some objects from on form to another, using events. the main form does not calls the sec http://www.barakasoft.com/script/Forums/Images/smiley_OMG.gif ondary form, it is being called from somewhere else. So i cant use any of the things listed in this article.

Passing Data Between Forms (http://www.codeproject.com/KB/cs/pass_data_between_forms.aspx)[^ (http://www.codeproject.com/KB/cs/pass_data_between_forms.aspx)]

i tried to use Microsoft unity block (Event broker) method, but it didn't work for me as posted in this article.

http://elegantcode.com/2008/04/09/unity-10-eventbroker-sample-cab-style/[^ (http://elegantcode.com/2008/04/09/unity-10-eventbroker-sample-cab-style/)]

Others methods can be using windows message queues or database.
Is there any other solution. Please i require some help urgently. some code will be appreciated.
Note: Performance is a major issue in my App as i am building a tcp server with some live mapping. And if anyone has a working solution using subscriber/publisher in event broker, it would be highly appreciated.