Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Run-time error in C#

I am new to the .net framework and have been trying to get the activeX imaq and vision components to work in a C# windows application. Right now my program crashes when it gets to the following line:

this.axCWIMAQViewer1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axCWIMAQViewer1.OcxState")));

Do I need to include any libraries? When I comment this line out, the application loads; if I leave it in the application dialog doesn't load because it is in the InitializeComponent() function.
0 Kudos
Message 1 of 2
(4,146 Views)
Hello,

The first step to begin troubleshooting your issue would be try out our example programs. When you include support for VB.Net while installing Vision, then you will be able to look at the shipping examples for VB.Net that are very similar to C# examples. I recommend looking at those examples to get an idea of how they set up their code. If you are able to run those examples, you should have installed the libraries required to use the "cwimaqViewer" control.

Good luck with your application and have a great day!
Regards,
Koninika
Applications Engineering
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 2
(4,125 Views)