469,279 Members | 2,260 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,279 developers. It's quick & easy.

Extracting icons from command buttons

A friend gave me a copy of an access database he was working on a few years
back. Its similar to what I want to design so I'm using is as a starting
point. Problem is, he used some need images on many of his command buttons.
They are embedded in the database. On the properties window, it tells me
where they were originally located on the hard drive. Great, except my buddy
doesn't have them on his hard drive anymore! Is there any way to extract
them from the buttons?
Oct 23 '06 #1
1 3512
There is a SysCmd call that allows you to create an IPictureDisp for an
Image control, or for any control that exposes a PictureData property. You
can them simply call the SavePicture method of that interface to save the
Image to a disk based Bitmap.

Here is the sample code behind the Click event of a Command Button named
Command0.

Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim pic As stdole.IPictureDisp
Set pic = SysCmd(712, Me.Command0)

SavePicture pic, "C:\ZZ.bmp"

Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Rad Daddy" <no**@none.comwrote in message
news:1O******************@fe04.news.easynews.com.. .
>A friend gave me a copy of an access database he was working on a few years
back. Its similar to what I want to design so I'm using is as a starting
point. Problem is, he used some need images on many of his command buttons.
They are embedded in the database. On the properties window, it tells me
where they were originally located on the hard drive. Great, except my
buddy doesn't have them on his hard drive anymore! Is there any way to
extract them from the buttons?

Oct 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bill W. | last post: by
3 posts views Thread by Mairhtin O'Feannag | last post: by
1 post views Thread by John Holmes | last post: by
1 post views Thread by goss9394 | last post: by
4 posts views Thread by Ant | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.