Community
The Inventor API helps shows this for defining a button icon:
Dim oControlDefinitions As ControlDefinitions Set oControlDefinitions = oApp.CommandManager.ControlDefinitions Dim oLargeIcon As IPictureDisp Dim oSmallIcon As IPictureDisp Set oLargeIcon = LoadPicture(App.Path & "\Large.ico") Set oSmallIcon = LoadPicture(App.Path & "\Small.ico") Set oButtonDefinition = oControlDefinitions.AddButtonDefinition( _ "Display Name", "invrSampleCommand", _ kShapeEditCmdType, "CLSID of the AddIn", _ "Description Text", "Tooltip", _ oSmallIcon, oLargeIcon, _ kDisplayTextInLearningMode) |
But how would I use My.Resources to assign the button icon?
Microsoft.VisualBasic.Compatibility.VB6.IconToIPicture isn't supported anymore.
Solved! Go to Solution.
Solved by VdVeek. Go to Solution.
Thomas, This is working for me when i use an addin wizard in Visual Basic 2010 Express :
Dim image1 As New Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("vdv.bmp"))
Dim progImage As IPictureDisp
progImage = InventorButton.ImageToPicture(image1)
Rob.