G
Guest
I have a Form that hosts a control (used for visual
feedback).
From this form a Class is created.
This Class has several events/delegates that are triggered
by a Socket (which is a member of the class)'s Async
Callbacks. [Eg OnConnected, etc ].
From within this delegate eg. OnConnected, OnReceivedData
and OnClose I need a way to be able to provide visual
feedback to the form.
I setup an event/delegate on the Form and made it public
so others could access it. A refernece to the Form was
passed to the Class when it was created.
However the minute i call Parent.Invoke
(Parent.VisualMethod,......) the program hangs. Trapped
inside a Try catch to catch any exceptions the program
just hangs. I've stepped through the code and when I step
into that line the program and debugger never come back.
I've tried Control.Invoke, new DelegateMethod(parameters),
Parent.VisualControl.Methodstoupdate
Maybe there is something here I dont quite fully
understand. Maybe there is something very simple that I'm
missing. Or Maybe there is an alternate method of
achieving my goal.
feedback).
From this form a Class is created.
This Class has several events/delegates that are triggered
by a Socket (which is a member of the class)'s Async
Callbacks. [Eg OnConnected, etc ].
From within this delegate eg. OnConnected, OnReceivedData
and OnClose I need a way to be able to provide visual
feedback to the form.
I setup an event/delegate on the Form and made it public
so others could access it. A refernece to the Form was
passed to the Class when it was created.
However the minute i call Parent.Invoke
(Parent.VisualMethod,......) the program hangs. Trapped
inside a Try catch to catch any exceptions the program
just hangs. I've stepped through the code and when I step
into that line the program and debugger never come back.
I've tried Control.Invoke, new DelegateMethod(parameters),
Parent.VisualControl.Methodstoupdate
Maybe there is something here I dont quite fully
understand. Maybe there is something very simple that I'm
missing. Or Maybe there is an alternate method of
achieving my goal.