Imagelist in my Add-in.

Imagelist in my Add-in.

Anonymous
Not applicable
255 Views
2 Replies
Message 1 of 3

Imagelist in my Add-in.

Anonymous
Not applicable
I have tried to use a Imagelist instead of loadpicture (as in the Add-in
sample code) in my Add-in but don't manage to get it work.
Someone that has a sugestion or maybe a bit of code?
(The reason for this is that i would like to have the icons "inside the
dll")

Lars Andersson
0 Likes
256 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Lars

What I will do a lot of times is to put in some invisible image or picture boxes to hold
the icons.

Then do something like this to change it. img2 being the invisible one that is just
there to hole the picture. It takes 2 invisible ones to do it though, because you need
one to also have the original image.

If img1 <> img2 then
img1= img2
end if

--
Kent
Assistant Moderator
Autodesk Discussion Forum Moderator Program


"Lars Andersson" wrote in message
news:4DB91370EB46F1D99499A4EB377E25A6@in.WebX.maYIadrTaRb...
> I have tried to use a Imagelist instead of loadpicture (as in the Add-in
> sample code) in my Add-in but don't manage to get it work.
> Someone that has a sugestion or maybe a bit of code?
> (The reason for this is that i would like to have the icons "inside the
> dll")
>
> Lars Andersson
>
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
Kent,

I added a couple of images (my icons) to a "invisible" Form and used them
and that worked.

Dim oIcon1 As IPictureDisp
Set oIcon1 = STDobjects.Image1.Picture
Set oButtonHandler1 =
AddInSiteObject.CreateButtonDefinitionHandler("CopyFiles",
kFileOperationsCmdType, "Copy files", "Copy files and update path
reference", "Copy files", oIcon1, oIcon1)

Lars Andersson
0 Likes