User (Legacy) Posted December 20, 2002 Report Share Posted December 20, 2002 Hi, I'm trying to add my own picture to a new command. I've followed the example in the help (picTable is a picture box): ChartFX1.Commands.AddCommand 306 Dim nIndex As Integer nIndex = ChartFX1.Commands.AddPicture(picTable.Picture) Debug.Print "my index " & nIndex ChartFX1.Commands(306).Picture = nIndex ChartFX1.ToolBarObj.AddItems 1, 0 ChartFX1.ToolBarObj(0).CommandID = 306 The nIndex value always returns -1. Am I doing something wrong? Thanks. Link to comment Share on other sites More sharing options...
Software FX Posted December 20, 2002 Report Share Posted December 20, 2002 What type of picture is picTable.Picture, it has to be 16x15 pixels at 16 colors (256 in Windows XP). -- FP Software FX Support "richard cleary" <richard@lg01.com> wrote in message news:imhV6uBqCHA.2684@webserver1.softwarefx.com... > Hi, > > I'm trying to add my own picture to a new command. > I've followed the example in the help (picTable is a picture box): > > ChartFX1.Commands.AddCommand 306 > Dim nIndex As Integer > nIndex = ChartFX1.Commands.AddPicture(picTable.Picture) > Debug.Print "my index " & nIndex > ChartFX1.Commands(306).Picture = nIndex > ChartFX1.ToolBarObj.AddItems 1, 0 > ChartFX1.ToolBarObj(0).CommandID = 306 > > The nIndex value always returns -1. > Am I doing something wrong? > > Thanks. > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.