M
MeAgin
Hi all,
When I try to cast an object (ListBox control in an outlook mail form)
retrieved from an outlook add-in it is giving the error,
Unable to cast COM object of type 'System.__ComObject' to class type
'System.Windows.Forms.ListBox'. Instances of types that represent COM
components cannot be cast to types that do not represent COM components;
however they can be cast to interfaces as long as the underlying COM
component supports QueryInterface calls for the IID of the interface.
How can I cast my object to an interface so I can use it as a normal windows
ListBox?
Thanks.
Nadee
When I try to cast an object (ListBox control in an outlook mail form)
retrieved from an outlook add-in it is giving the error,
Unable to cast COM object of type 'System.__ComObject' to class type
'System.Windows.Forms.ListBox'. Instances of types that represent COM
components cannot be cast to types that do not represent COM components;
however they can be cast to interfaces as long as the underlying COM
component supports QueryInterface calls for the IID of the interface.
How can I cast my object to an interface so I can use it as a normal windows
ListBox?
Thanks.
Nadee