Chitra Karthik

Hi,

I have a add-in which I am using to add thrid party controls to the Visual studio IDE. The control are getting added from a tree control which has Tables and fields from the database. These fields and tables are having corresponding control names in the Database.

Because these are 3rd party control we having licensing problem which we have over come by checking if we are adding it in the Design time or in the run time.

In the add in, this control is getting added to the form through

Host.createcomponent(ctrlType)

When we add to control using this the control thinks it is getting add at run time and throws an licensing error.

Is there any way where we can set that this design time not run time or barring that is there any other way in which we can add the control to the form.

Note: If we add the same control from the toolbox it is getting added properly.

Regards,

Chitra




Re: Visual Studio Extensibility Add_ins

Carlos Quintero - MVP

I don't fully understand your post but see:

HOWTO: Guessing the IDE mode (design, debug or run-time) from a Visual Studio add-in or macro

http://www.mztools.com/resources_vsnet_addins.htm

HOWTO: Add a control to a Windows form from a Visual Studio add-in

(same link)






Re: Visual Studio Extensibility Add_ins

Chitra Karthik

Hi,

The link which you gave me is how I am currently using to create the Controls to the form. This giving some problem when we use a 3rd party control.

I need to know if there is any other why to add a component to the form other than Host.createcomponent.

Regards,

Chitra






Re: Visual Studio Extensibility Add_ins

Carlos Quintero - MVP

No that I am aware of, I think that as long as a) you are at design-time and b) you have the design-time license of the 3rd-party control, it should work. Which is the 3rd-party control




Re: Visual Studio Extensibility Add_ins

Chitra Karthik

Hi,

Thanks. The 3rd party control we are using is Janus and we have the design time license

Also I am trying to overcome this problem by using DoDragdrop to create the controls

Regards,

Chitra






Re: Visual Studio Extensibility Add_ins

Chitra Karthik

Hi,

I need to know if there is any way where I can convert the toolbox item to a control. When I dragdrop the item i am unable to set the properties for it.

For that i need to convert the toolbox item to a control.

Regards,

Chitra






Re: Visual Studio Extensibility Add_ins

Carlos Quintero - MVP

The EnvDTE80.ToolBoxItem2 class has the Name and Data properties that can give you some info, but a toolbox item is not really a control, the control is created on the form designer.