Image on a Switchboard

J

John

I wish to place an image on the Switchboard (office picture image) that
depending on the location I will be installing the application, it will
change image. Is there a way to build a directory path within code that
depending on the image that is within this path it will display it within a
certain location on the Switchboard. So London Office would a certain image;
Glasgow a different one etc, without having to physically change every
Database (I have 23 locations to do). If so where would I place this code

Thanks
 
J

Joseph Meehan

John said:
I wish to place an image on the Switchboard (office picture image)
that depending on the location I will be installing the application,
it will change image. Is there a way to build a directory path within
code that depending on the image that is within this path it will
display it within a certain location on the Switchboard. So London
Office would a certain image; Glasgow a different one etc, without
having to physically change every Database (I have 23 locations to
do). If so where would I place this code

Thanks

I don't know if this is what you want, but I believe that if you give
all the images the same name (may need to have the same size (file and or
pixel ratio) you should be able to just change that specific file. I
suppose you could write code that would ask the question about the location
(or detect it somehow) and then copy/namechange the needed file.
 
X

xplusx

did you try to create a table of images
and then probably insert a combo box
prompting the user to specify location (upon first use)
so the idea is upon deployment of application,
user has to select in which location he's in
 
T

Tony_VBACoder

One thought would be to have an image control on your
Switchboard form where the "Picture" property of the Image
Control would be set to empty (""). Have some sort of
function in your program that would return the full path
to the image based on some value you could enter during
the installation or you could read some value from the
Windows Registry. See sample code below:

***********************************************************
Public Function sGetImagePath(sCity As String) As String

Select Case sValue
Case "London": sGetImagePath = "C:\Images\London.Gif"
Case "Paris": sGetImagePath = "C:\Images\Paris.Gif"
Case "Italy": sGetImagePath = "C:\Images\Italy.Gif"
End Select

End Function
***********************************************************

To display the image on the Form, during your
initialization routine, set the Picture property of the
image control to value you will need to lookup somewhere.

Dim sCity As String
' Lookup the City based on something and pass it to the
function
Me.imgPicture.Picture = sGetImagePath(sCity)



Just a quick thought to get you started.
 

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

Top