R
Ryan
I have a dilemma that I'm having a tough time getting through on a VB
2005 issue. I have a custom control for a form to display data from a
windows form. Right now, the main form calls various web service
methods in order to update the data. Since the data to be displayed
depends on the call to the web service, I use a delegate that will
invoke the method when a timer elapses. Works good for now but I want
to create additional custom controls that will display data and have
the main form cycle through the controls. Because of this, I figured
that it would be easier to implement an interface on the custom
control so that the form can instantiate the controls dynamically as
it cycles through.
So here's my dilemma. The control (or controls) could call various
methods to get a "data refresh". Therefore, I wanted to give the
control the delegate to invoke within itself as the main form cycles
through each control on a separate timer. But how do I do that using
an interface? I can't have the delegate on the interface because its
a type. I can't pass in the signature to the c'tor because it's not a
type. What options do I have?
I appreciate any help anyone can give.
2005 issue. I have a custom control for a form to display data from a
windows form. Right now, the main form calls various web service
methods in order to update the data. Since the data to be displayed
depends on the call to the web service, I use a delegate that will
invoke the method when a timer elapses. Works good for now but I want
to create additional custom controls that will display data and have
the main form cycle through the controls. Because of this, I figured
that it would be easier to implement an interface on the custom
control so that the form can instantiate the controls dynamically as
it cycles through.
So here's my dilemma. The control (or controls) could call various
methods to get a "data refresh". Therefore, I wanted to give the
control the delegate to invoke within itself as the main form cycles
through each control on a separate timer. But how do I do that using
an interface? I can't have the delegate on the interface because its
a type. I can't pass in the signature to the c'tor because it's not a
type. What options do I have?
I appreciate any help anyone can give.