comments inline.
Arvin Meyer MVP said:
I fell asleep early last night so I didn't start answering questions until
today.
no problem, Arvin. i appreciate your time and help, as always.
As far as I know, the paths to the backgrounds in the listbox are stored in
a specific place, defined by the installation of Office. Mine for Office XP
are at:
C:\Program Files\Microsoft Office\Office10\Bitmaps\Styles\
okay, that's where the picture files are stored. but once you choose a
picture to display as the desktop background, that picture displays every
time you boot up your PC - until you choose another one. so Windows has to
be storing the filepath of the selected picture file somewhere, and
accessing the information each time. *that's* the information i want to find
and retrieve programmatically.
Form images are embedded in the form, so you don't need to look them up each
time. That said, the MDI background is not, and must be entered each time so
they are hard coded. That doesn't have to be carved in stone though. Since
you are the programmer, you are the goddess of what happens in the program.
You could prepare the images (remember they must be sized of resolution if
there's a bitmap logo in the center) and put the paths in a table, then have
the user select one (store the select in a boolean), then look up that path
at runtime and access the file.
a goddess....hmm, i like the sound of that! <g>
actually, i don't want to hard code the filepath at all, anywhere. i want to
write code for a specific database, that will run (probably from an AutoExec
macro) and look up the filepath of the current picture being displayed on
the desktop, as i described above, and then run Stephen's code, using that
filepath to assign the same picture to the MDI background. so whenever the
user changes the background of the desktop on his/her PC, the next time s/he
opens the db, that same picture will show as the MDI background,
automatically.
any ideas on how i can find and retrieve the filepath? i keep thinking it
must be in the registry somewhere, but i haven't a clue how to find it and
call it out.