with the help of remoting I created client and server two applciation. From client application I am handling server
side events. but problem is that after I invoke event.Event
back tracking is going on. server application is opening from
sub main. After I call event from client applicaiton evnet back
tracking is going on and event start going back and back up to
sub main. and ging error of form.show.
Could you please suuges how should I stop event back tracking
Events are not one way, if you are debugging and tracing your events, the event calls a function (the receiver) and when it is finished the call stack MUST collapse back up to the event firing routine.
What I think your problem is, is that you are interacting on the UI from a different thread (events are spawned in new threads). Interacting with a form from an event will cause an exception (where the event is fired, not where you interact with the UI).
In order to interact with the UI, you have to invoke (using the Form.Invoke or Control.Invoke) methods if the InvokeRequired flag is true on the form or control. This is true even when opening new forms or setting properties of existing controls or forms, otherwise you can get an IllegalCrossThreadException or an application hang.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)