Icons for Toolbars

Icons for Toolbars

Anonymous
Not applicable
223 Views
3 Replies
Message 1 of 4

Icons for Toolbars

Anonymous
Not applicable
Can anyone please help I have created a new tool bar and I am trying to
assign a Bmp
image to the button.

I have tried the SetBitMap and GetBitMap, but this seems to only control
the size of the image not the image itself

This is my code to create the toolbar
LoadMacro = Chr(45) & "vbaload" & Chr(32) & "TitleBlockAttributes.dvb" &
Chr(32)
RunMacro = Chr(45) & "vbarun" & Chr(32) & "TitleBlockAttributes" & Chr(32)

Set LoadButton = newToolBar.AddToolbarButton("", "Load_Macro",
"LoadingMacro", LoadMacro)
Set RunButton = newToolBar.AddToolbarButton("1", "Run_Macro",
"RunningMacro", RunMacro)
LoadButton.SetBitmaps = Load.BMP

Regards

Steven Houghton
0 Likes
224 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Try something like this, although it's similar to what you have, it works
here. You may just need to put the bitmap name in quotes:

SmallBitmap = "16x16.bmp"
LargeBitmap = "32x32.bmp"
LoadButton.SetBitmaps SmallBitmap, LargeBitmap

-- Walter -- http://www.ActiveDwg.com

Steven Houghton wrote in message
news:[email protected]...
> Can anyone please help I have created a new tool bar and I am trying to
> assign a Bmp
> image to the button.
>
> I have tried the SetBitMap and GetBitMap, but this seems to only control
> the size of the image not the image itself
>
> This is my code to create the toolbar
> LoadMacro = Chr(45) & "vbaload" & Chr(32) & "TitleBlockAttributes.dvb" &
> Chr(32)
> RunMacro = Chr(45) & "vbarun" & Chr(32) & "TitleBlockAttributes" & Chr(32)
>
> Set LoadButton = newToolBar.AddToolbarButton("", "Load_Macro",
> "LoadingMacro", LoadMacro)
> Set RunButton = newToolBar.AddToolbarButton("1", "Run_Macro",
> "RunningMacro", RunMacro)
> LoadButton.SetBitmaps = Load.BMP
>
> Regards
>
> Steven Houghton
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
LoadButton.SetBitmaps "Load.bmp", "Load1.bmp"
where load and load1 are the name of toolbuttons in a resource dll or the
full path to your saved bitmap
Steven Houghton wrote in message
news:[email protected]...
> Can anyone please help I have created a new tool bar and I am trying to
> assign a Bmp
> image to the button.
>
> I have tried the SetBitMap and GetBitMap, but this seems to only control
> the size of the image not the image itself
>
> This is my code to create the toolbar
> LoadMacro = Chr(45) & "vbaload" & Chr(32) & "TitleBlockAttributes.dvb" &
> Chr(32)
> RunMacro = Chr(45) & "vbarun" & Chr(32) & "TitleBlockAttributes" & Chr(32)
>
> Set LoadButton = newToolBar.AddToolbarButton("", "Load_Macro",
> "LoadingMacro", LoadMacro)
> Set RunButton = newToolBar.AddToolbarButton("1", "Run_Macro",
> "RunningMacro", RunMacro)
> LoadButton.SetBitmaps = Load.BMP
>
> Regards
>
> Steven Houghton
>
0 Likes
Message 4 of 4

Anonymous
Not applicable
Once, when i had a lot of free time, i've wrote little routine to convert
the bitmap files into code, so you can insert the bitmap files as a little
data string into your code and into your DVB file. It also has some example
code to assign the bitmaps to your toolbarbuttons.
You can download this lill'routine at
http://www.jwk.mbit.nl/codenoodles/icon2code.html

Maybe this will help you a bit.

wkr, jwk

Steven Houghton had the next bright idea:

>Can anyone please help I have created a new tool bar and I am trying to
>assign a Bmp
>image to the button.
>
>I have tried the SetBitMap and GetBitMap, but this seems to only control
>the size of the image not the image itself
>
>This is my code to create the toolbar
>LoadMacro = Chr(45) & "vbaload" & Chr(32) & "TitleBlockAttributes.dvb" &
>Chr(32)
>RunMacro = Chr(45) & "vbarun" & Chr(32) & "TitleBlockAttributes" & Chr(32)
>
>Set LoadButton = newToolBar.AddToolbarButton("", "Load_Macro",
>"LoadingMacro", LoadMacro)
>Set RunButton = newToolBar.AddToolbarButton("1", "Run_Macro",
>"RunningMacro", RunMacro)
>LoadButton.SetBitmaps = Load.BMP
>
>Regards
>
>Steven Houghton
>

--
--------------------------------------------------------
You ask a silly question, you get a technical answer...
________________________________________________________
0 Likes