Discussion:
Problem connecting an ImageList to an ActiveX Control
(too old to reply)
derek24
2006-11-14 12:40:09 UTC
Permalink
Hi,
 
I have an ActiveX control (igrid from 10Tec.com) and i want to connect an ImageList (microsoft ImageList) to it, but the property (ImageList)see in LabVIEW is just readable and i can't connect the two control together.
 
See the attach picture : In the Context menu change to write is disable !!!
 
It is not the first time that i saw this sort of problem and i am asking myself why ?.
 
My question is : Is the problem come from the Activex Control or with LabVIEW ; because in Visual Basic it is possible to connect the ImageList and the activex control together ?!!!
 
Thank you for any ideas
 
Derek


ImageList.png:
Loading Image...
derek24
2006-11-14 14:40:08 UTC
Permalink
I have remark some strange effect. I can play with some properties and method with no problem but i try to read the ImageList property i got an error message. (see attach picture).
 
What does this message mean ? Is it a problem from LabVIEW ? because in Visual Basic example every thing work fine ?!
 
Derek


ImageList error.png:
http://forums.ni.com/attachments/ni/170/215298/1/ImageList error.png
modeley
2006-11-16 14:40:10 UTC
Permalink
Hi Mike,
I am actually evaluating this product and maybe the problem you say is true. i will send an email to 10Tec to have their opinion (using igrid outside VB) of this.... but i think the problem come from LabVIEW because i got exatly the same problem on an another free activex control (for making a toolbar).
 
I have ask 10Tec and they have test it. They have give this answer :
 
As you can see by iGrid.NET and iGrid ActiveX, LabVIEW does not support properly all the standard .NET and COM data types, and this concerns your last problem with the ImageList property. One of our customers already tried iGrid OCX in LabVIEW and faced this problem as well. The ImageList property has the Variant data type, and this prevents this property from being used properly in LabVIEW.
 
To solve the problem, we implemented a special separate build of iGrid in which the ImageList property was replaced with the SetImageList method (it means now you set the image list used by iGrid through the method but not the property). Attached you'll find this special build. Try to use it in LabVIEW and please let us know whether it works fine in this environment.
i send you the file in attach zip
Do you know if i got the code source of an activex control (which is create in VB), if it is possible to create a wrapper function in Visual Basic so that it is possible so connect the ImageList control to my activex control (like i connot do it directly in LabVIEW)?
Thank for any ideas
Derek


iGrid251_5B3BD94D.zip:
http://forums.ni.com/attachments/ni/170/215768/1/iGrid251_5B3BD94D.zip
modeley
2006-11-17 12:10:07 UTC
Permalink
I have noticed an another strange effect. For example, if (1)  you take the igrid and create a ImageList property node,
the property can only be read (can not change to write, or it is suppose to be a write property node !!!). Now if (2) you take a microsoft activex control (the TreeView for example) and you create a ImageList property node, you can change this node to be a read or a write node (everything work fine). Make the property (ImageList) be a write property. Then disconnect the TreeView reference for the node and connect the igrid reference to the ImageList Node. The property still be a write property !!! you can then connect the microsoft ImageList activex control to the ImageList property node of the igrid and you can use it normaly. This is very strange why LabVIEW accept this no ?!!!
 
I this i really the help of an NI engineer to undestand why.
 
Derek
derek24
2006-11-20 09:10:07 UTC
Permalink
Hi Mike,
 
First, thank you for your help, i am very glad to know that i got an National Instruments engineer working on my problem. I really want to know that happen and have a name on that strange effect ?!!!
 
I have attach a very simple example to show that it's work (deconnect the image property for microsoft treeview for example and connect it to the igrid). I am able to place my icons in the igrid. Everything work well.
 
I want to make a remark here : This works because the property name (ImageList) on the TreeView and the Igrid is the same (Same Name). I got an another activex control from vbaccelerator (The command bar), which&nbsp;i want to use to make a&nbsp;professionnal toolbar in my project (<a href="http://www.vbaccelerator.com/home/vb/Code/Controls/Command_Bar/vbAccelerator_CommandBar_Control/article.asp" target="_blank">http://www.vbaccelerator.com/home/vb/Code/Controls/Command_Bar/vbAccelerator_CommandBar_Control/article.asp</a>). This control has two image list :&nbsp;ToolbarImageList and MenuImageList.
&nbsp;
When i try to use this property i got the same problem : i am just able to read as they suppose to be a write property (and if i&nbsp;try to read it, i got a compilator error from LabVIEW.... exatly the same that i got with the igrid). So, If i try to to the same thing, i have done with the treeview and the igrid, i can't because the property ToolbarImageList do not have the same name of ImageList.
&nbsp;
My question is :
&nbsp;
(1) can i have a solution for that problem in LabVIEW.
&nbsp;
(if not) : (2) do i have to create a new function, a wrapper function in Visual Basic that&nbsp;will make this connection&nbsp;&nbsp;(ToolbarImageList&nbsp;of the&nbsp;Command Bar) possible in LabVIEW (this is mean that i got the source code of the activex control like this control in a open source). Now i will have to contact a VB expert to have information on how to do this.
&nbsp;
(3) Maybe create a new (activex) dll in VB, with only one function that will got parameters, one will be the reference of the control you want to connect an ImageList and the second parameter will be&nbsp; the reference of the ImageList Control (microsoft imagel list for example). This function will make the a "in house" connection of the two controls ?!!! (i don't know it is just an idea ? !!!)
&nbsp;
I am waiting of any information that you can give me because i really want to make this toolbar working like i am able to make the igrid work in my project.
&nbsp;
Thank you very much for your help
&nbsp;
Derek
&nbsp;
&nbsp;


test igrid.vi:
http://forums.ni.com/attachments/ni/170/216210/1/test igrid.vi

Loading...