Having trouble creating a button on a panel

Having trouble creating a button on a panel

chipwitch
Advocate Advocate
421 Views
1 Reply
Message 1 of 2

Having trouble creating a button on a panel

chipwitch
Advocate
Advocate

Hi All.

 

I've spent all day searching to no avail. 

 

I'm trying to create an add-in with custom button on a custom ribbon panel using a custom .ico.  Every example I find shows using iPictureDisp as the type and the LoadPicture() method.  I've searched for a com or .net to include for LoadPicture and it appears that it's deprecated, part of vb6 namespace, which I can't find on my system.  First of all, I can create the button with text only.  Visual Studio's intellisense says the LoadPicture method is "undeclared".  I'm surprised I can't find others experiencing this issue as it's also what's suggested in the updated help file.

 

How are you handling this issue with your add-ins?  Finding version specific solutions is a nightmare.

 

Windows 7 64-bit

Inventor 2013 Professional (Production ultimate suite)

Visual Studio 2010 Express / VB.net

 

 

 

 

0 Likes
Accepted solutions (1)
422 Views
1 Reply
Reply (1)
Message 2 of 2

chipwitch
Advocate
Advocate
Accepted solution

I'm still having some trouble, however, I have managed to get an icon onto a button on a panel through the add-in on a 64-bit OS.

 

Should anyone else have this problem, create the class in the blog below and compile with your project.  Still seems like a lot of work to get a silly picture on a button!  Thanks to the author, Philippe Leefsma for providing this solution.

 

http://adndevblog.typepad.com/manufacturing/2012/06/how-to-convert-iconbitmap-to-ipicturedisp-withou...

 

 

0 Likes