Tool Button Bitmaps?

Tool Button Bitmaps?

Anonymous
Not applicable
609 Views
10 Replies
Message 1 of 11

Tool Button Bitmaps?

Anonymous
Not applicable
Hi Everyone,

I have some sample code from help that uses the "getbitmap" & "setbitmap"
methods to create a toolbar & button including the picture of my choice. Is
it possible to put that bitmap in an "Image box" on a form instead of in a
tool button?

Thanks in advance,

Gary
0 Likes
610 Views
10 Replies
Replies (10)
Message 2 of 11

Anonymous
Not applicable
in the properties window of your image set its picture property to the path
of your bitmap
Gary McMaster wrote in message
news:567435F3BD4BC713B1F24C8DA3A41F3B@in.WebX.SaUCah8kaAW...
> Hi Everyone,
>
> I have some sample code from help that uses the "getbitmap" & "setbitmap"
> methods to create a toolbar & button including the picture of my choice.
Is
> it possible to put that bitmap in an "Image box" on a form instead of in a
> tool button?
>
> Thanks in advance,
>
> Gary
>
0 Likes
Message 3 of 11

Anonymous
Not applicable
Thanks Joe but it doesn't have a path. Its one of the built it bitmaps
residing in a .mnr or .dll file. Would you happen to know how to access
these resources? I see .dll files with the same names as the .mnu and .mnr
files but don't know how to access them or if it is even possible to access
them from VBA.

Gary
0 Likes
Message 4 of 11

Anonymous
Not applicable
if you go into the button properties dialog box
(right click on a toolbar and choose customise then right click a button to
bring up this window) the edit button for the button icon will allow you to
do SaveAs
and hence give it a path
Gary McMaster wrote in message
news:92122822C395B78935FD2DC8921317A1@in.WebX.SaUCah8kaAW...
> Thanks Joe but it doesn't have a path. Its one of the built it bitmaps
> residing in a .mnr or .dll file. Would you happen to know how to access
> these resources? I see .dll files with the same names as the .mnu and .mnr
> files but don't know how to access them or if it is even possible to
access
> them from VBA.
>
> Gary
>
0 Likes
Message 5 of 11

Anonymous
Not applicable
Thanks again for your interest Joe.

I have exported them already (as a temporary measure) for lack of a means of
doing what I am attempting now. I am trying to get around the need to export
the bitmap as my own private file. I would like to take the bitmap image
directly out of the .dll or .mnr or wherever it is stored, display the image
temporarily and then clear it without ever saving it.

Gary
0 Likes
Message 6 of 11

Anonymous
Not applicable
I think the images are in 'ACADBTN.DLL'. Not sure how to extract them using
VBA though.
-- Walter -- http://www.ActiveDwg.com

Gary McMaster wrote in message
news:DA4E1BAB65A26015E26BA849FB54E322@in.WebX.SaUCah8kaAW...
> Thanks again for your interest Joe.
>
> I have exported them already (as a temporary measure) for lack of a means
of
> doing what I am attempting now. I am trying to get around the need to
export
> the bitmap as my own private file. I would like to take the bitmap image
> directly out of the .dll or .mnr or wherever it is stored, display the
image
> temporarily and then clear it without ever saving it.
>
> Gary
>
0 Likes
Message 7 of 11

Anonymous
Not applicable
Thanks Walter. I think I saw one of your previous posts regarding that dll
when I searched the NGs about this topic.

Gary
0 Likes
Message 8 of 11

Anonymous
Not applicable
Using the GetBitmaps and SetBitmaps methods you can only get the strings
that are the references to the bitmaps.

Now, if you knew where the bitmap was located (in which DLL), you could
reference this DLL in your VB/VBA project and use it as a resource DLL. The
problem is that the DLL has to be registered, and the ACADBTN.DLL has no
DLLRegisterServer entry point.

From what I know, this means that there is no way to get the bitmaps from
ACADBTN.DLL and use them in an image box, using VB/VBA.

Now, I'm not sure about this, so if someone can prove me wrong, please do.

--
Rune Wold
System Analyst
Engineering Systems
rune@engsys.no
--

"Gary McMaster" wrote in message
news:567435F3BD4BC713B1F24C8DA3A41F3B@in.WebX.SaUCah8kaAW...
> Hi Everyone,
>
> I have some sample code from help that uses the "getbitmap" & "setbitmap"
> methods to create a toolbar & button including the picture of my choice.
Is
> it possible to put that bitmap in an "Image box" on a form instead of in a
> tool button?
>
> Thanks in advance,
>
> Gary
>
0 Likes
Message 9 of 11

Anonymous
Not applicable
Rune,

Thanks for your input. I have been scrounging up all the info I can find on
the acadbtn.dll and have run into the lack of a DLLRegisterServer entry
point snafu during the search. So far it would seem that you are entirely
correct in saying that it can't be done from VBA. I guess that answers my
original question and I will have to go to plan B.

Gary
0 Likes
Message 10 of 11

Anonymous
Not applicable
There's a Plan 'B'?
-- Walter -- http://www.ActiveDwg.com

Gary McMaster wrote in message
news:E733B2E8B53656F6F7D4DC36BC7B009F@in.WebX.SaUCah8kaAW...
> Rune,
>
> Thanks for your input. I have been scrounging up all the info I can find
on
> the acadbtn.dll and have run into the lack of a DLLRegisterServer entry
> point snafu during the search. So far it would seem that you are entirely
> correct in saying that it can't be done from VBA. I guess that answers my
> original question and I will have to go to plan B.
>
> Gary
>
0 Likes
Message 11 of 11

Anonymous
Not applicable
Yes. Plan B was what Joe described earlier in exporting the bitmaps to
separate files. I already had that done but didn't want to carry all that
extra baggage around. Not to mention having the same data stored twice on
the same machine. Maybe there is a plan C?

Gary
0 Likes