Dynamically Created Viewer requires license file


http://www.s-code.com/forum/Topic1601.aspx
Print Topic | Close Window

By Airegin - Monday, August 20, 2007
Doing something like this will cause the licensing popup window to pop up on user machines. The only way I've found to get around it is to deploy the .lic file with with. What is the correct way to handle this?

(VB.NET 2005)

dim objVNC = New AxViewerX.AxCSC_ViewerXControl

Me.PanelMain.Controls.Add(objVNC)

I can send a demo project and binaries if that helps..

By Yury Averkiev (s-code) - Monday, August 20, 2007
The licensing popup appears when COM reports that the ActiveX is running in "design mode". You shouldn't redistribute the .lic file with your application.

In the VNC Manager we also using dynamically created ViewerX instances as part the VNC Thumbnails view feature. I think you should add BeginInit() and EndInit() calls to your code. In C# the code should look like this:

AxViewerX.AxCSC_ViewerXControl objVNC = new AxViewerX.AxCSC_ViewerXControl();
objVNC.BeginInit();
//setup ViewerX properties here
PanelMain.Controls.Add(objVNC);
objVNC.EndInit();