Managing Linked Button and Background Graphics

  • Thread starter Thread starter nomadk
  • Start date Start date
N

nomadk

A2003
XP

In an effort to make my A2003 app look nice I'm using pictures for my
buttons and form backgrounds. I know I can embed the graphic file wherever I
use it but that, of course, leads to bloat. Also, since I reuse graphics
throughout the app linking images seems a much better choice.

My question is: How do I manage the images when I install my app? I assume I
need to install a folder with the graphics files but how do I link the images
to that folder? I guess if I install to C:\Program Files\PM Contact Manager
every time I can specify a subfolder but I probably won't be able to always
dictate that.

Are there standard protocols for handling this?

Thanks.
 
Put the folder in the same folder as your database. Use CurrentProject.Path
to return the path to the database. Then add the foldername to it, like
(untested):

Public Function ImagePath()
Dim strPath As String

strPath = CurrentProject.Path & "\ImageFolderName"

End Function

The you can call it like:

Me.ImageCtrl1.Picture = ImagePath() & "\FileWhatever.bmp"
 
Thanks very much Arvin.

And I call the function using Me.ImageCtrl1.Picture = ImagePath() &
"\FileWhatever.bmp" in the On Open event of the form?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top