Barcode Fonts, Components, ActiveX and .NET Windows Forms Controls, Java Servlets, 
DLLs and Barcode Scanners. IDAutomation.com, Inc., Computers Hardware, Software & Services, Tampa, FL   This site chose the Norton Secured Seal to promote trust online with consumers.    View your cart in the IDAutomation Store   


InvalidActiveXStateException Error

Solution(s):

This error is due to the ActiveX Control not being completely initialized when the textBox1_TextChanged event is called as the form loads. This behavior is by design in VS.NET and is largely due to the relative slowness of calling ActiveX controls in the managed code environment.

InvalidActiveXStateException Error

The workaround is to handle the error using a try|catch statement and then re-attempt the offending code after the component has been completely initialized.

An example of the try | catch in VB would be:

    Try
    AxBarCode1.DataToEncode = TextBox1.Text
    Catch ex As AxHost.InvalidActiveXStateException
    End Try

Related Information:
 ©Copyright 2017 IDAutomation.com, All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us

Training Videos on YouTube  Join us on Google Plus  Join us on LinkedIn  Follow us on Twitter  Like us on Facebook
Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.