Image Button Mouseover

I currently have a button in my VB app that has the image change on mouseover and click. I need to find a way to embed the extra images into my app (like it automaticaly is doing with the initial image) and then still have the mouseovers work (I just need to know how to access the embeded images).

Thanks in adavance!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can add the images into a resource file as custom resources.Just goto the add-in manager and select resource editor,then under the tools menu select resource editor and add each images as a custom resource then save the changes to the resource file.You can then access the images by their resource #.
What file type are the images? Are they all the same type?
ShroderAuthor Commented:
They are all jpgs.
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

ShroderAuthor Commented:
Also, while I have you, do you have any references on starting/stopping gif animations?

I can open a new questionf or this if needed.
Im not sure if there is a way to load the jpeg directly to the command button from a resource file. You can do it with bitmaps,icons and cursors. You could create a function or sub to save the jpg to the temp directory,load it then kill the file. Here is an example of that:

Private Sub Form_Load()
' load the image with resource id 101 into Command1
LoadImage Command1, 101
End Sub

Private Sub LoadImage(MyButton As CommandButton, ResId As Long)
Dim bData() As Byte, f As Integer, Tmp As String
f = FreeFile
bData() = LoadResData(ResId, "CUSTOM")
Tmp = Environ("Temp") & "\tmpp.jpg"
Open Tmp For Binary Access Write As #f
Put #f, , bData
Close #f
MyButton.Picture = LoadPicture(Tmp)
Kill Tmp
End Function

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ShroderAuthor Commented:
I did a little searching and came to that conclusion. You have verified it. :)

I'm going to try that now.
For starting and stopping gif animations check out Ark's example here:
ShroderAuthor Commented:
Thank you. I can figure out what's going on with that from the source. :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.