Jump to content
Software FX Community

commands.addpicture


User (Legacy)
 Share

Recommended Posts

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...