By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

Extracting icons from command buttons

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.