Barcode Fonts, Components, ActiveX and .NET Windows Forms Controls, Java Servlets, 
DLLs and Barcode Scanners. IDAutomation.com, Inc. is a BBB Accredited Business. Click for the BBB Business Review of this Computers Hardware, Software & Services in Tampa FL
Contact IDAutomationView your cart in the IDAutomation Store
Loading

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:

To sign up for monthly updates about new products or upgrades, please click here. © Copyright 2012 IDAutomation.com, Inc., All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us


70% of Fortune 100 Company's use IDAutomation Products.