Karl,
I do concede to a master like you. I am familiar with some of your previous
efforts.
That code actually changes the titlebar color of *any* window that has the
foreground, right?
Yes, any window that is active or activated subsequently.
That's not system modal, though, right? I mean, another app could still steal
the
foreground, or the user could Alt-Tab to another app, or yours could crash
leaving
another app in the foreground, or ..., or ..., or ...?
Yes, the system could still pop up a window outside of Word. And the
system's window titlebar would be changed.
And ..., or ...,-- those too.
And if you don't?
Not trying to be antagonistic, here. Just recalling a few hard-learned
lessons.
If you do, all previously changed windows, even those that accidentally pop
up before, will change back to normal, when selected again.
If you don't; or, since I didn't have code in case you selected button2
before button1, then you would have to go back and right click on the
Windows Desktop, select Properties...Appearance and select a theme that you
had before or if you restart Windows, I believe, it will reset back to what
you had before.
Nothing permanent, but I agree, that one must cover all bases to avoid
leaving a unwitting user perplexed.
I couldn't find a way yet to get the current active windows handle (easy)
and adjust its Caption (Titlebar) background only (hard, because it probably
involves bitmap coloring of regions, etc.).