Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InvalidActiveXStateException

Status
Not open for further replies.

BKtechie

MIS
Mar 27, 2002
132
US
I have two controls on a form that reference the same activeX control. After the Application.Run(myForm), one of the controls works, the other does not. The code in the constructor of the form is exactly the same for both controls. Can you have two instances of an external ActiveX control on the same form?
 
It is posssible to get that depending on what the control is doing. For example, if it is a singleton pattern implementation component then you have always the same instance but never two.

-obislavu-
 
Upon further review, it initializes the first instance and gives an error about windowless controls on the second.
&quot;System.Reflection.TargetInvocationException: Unable to get the window handle for the '<ActiveX name>' control. Windowless ActiveX controls are not supported. ---> System.NullReferenceException: Object reference not set to
an instance of an object.&quot;
This control is not a Windowless control... Any ideas, or did I find a bug?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top