Page 1 of 1

Trial Version Issues

Posted: 01 May 2008, 21:26
by Sean Miller
Maybe it's because I'm using the trial version.
I would like to be able to hide or remove button from the Toolbar from the CADViewerControl, so I go to Toolspanel->Buttons and set Button.Visible = False and it still shows. I have even tried to Delete the button(s) and they still show.
I try to use CadViewerControl.Image.LoadFromFile("C:\some folder\somedwg.dwg") and it generates an exception "Object reference not set to an instance of an object."

Re: Trial Version Issues

Posted: 06 May 2008, 09:46
by support
Hi,

Please try the following code:

Code: Select all

	this.cadViewerControl1.ToolsPanel.Buttons[12].Visible = false;
	this.cadViewerControl1.Invalidate();
Sergey.

Re: Trial Version Issues

Posted: 06 May 2008, 16:12
by Sean Miller
OK the ToolPanel.Buttons(Index).Visible through code works.
What about the Image.LoadFromFile?

Re: Trial Version Issues

Posted: 07 May 2008, 08:56
by support
Hi,

We added those lines in to private void InitParams(). It worked.

Sergey.

Re: Trial Version Issues

Posted: 07 May 2008, 21:39
by Sean Miller
private void InitParams()? This is nowhere to be found?

Open your ViewerControlVB sample application.
Change the code in the miOpenFile_Click routine to:

Me.cadViewerControl.Image.LoadFromFile("C:\some folder\somedwg.dwg")

This generates an exception. How or what do I need to do to get around this.
I am getting ready to purchase 3 licenses if I can just get over this last hurdle.

Thanks

Re: Trial Version Issues

Posted: 08 May 2008, 10:32
by support
Hello,

We added those lines in to:

Code: Select all

Private Sub InitializeComponent()
it worked.

Sergey.