MSHTML animated GIF example... trying to match dialog color

Started by stevengraff, March 16, 2014, 09:59:47 AM

Previous topic - Next topic

stevengraff

Having found the animated gif example, I couldn't resist putting a few in my script.

see http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Dialog~Editor/Dialog~Editor~version~6.X/Samples+Animated~GIF~in~Dialog.txt

QuoteUsing the property: document2.body.style.backgroundcolor = "#F7F1F1" I find I can get the gif to just blend in to the dialog, as if with no border of it's own. However, when trying my script on another computer (XP vs. Win 7) I find that the advantage doesn't "stick" i.e. the dialog's background color is apparently controlled by Windows.

How to solve? i tried document2.body.style.backgroundcolor = "transparent" but that really just turned the gif's background white. Can I query the "current" Windows to see what color my dialog is?

Good: http://www.screencast.com/t/FEXQ4vddQeK (Note how the folder appears to float on a contiguously homogenous background.)

Bad: http://screencast.com/t/YNcwJBER7 (Note how the rocket is surrounded in a much lighter appearing background.)

Note: I used the "quote" tags above because, apparently, my html references were "confusing" the forum technology.


JTaylor

If you have set the color of your dialog it is one of the dialog variables and you can interrogate that directly.   If it is set to DEFAULT then that is always the same so you could hard-code that value when it is needed.

Jim

stevengraff

Perfect -- thanks!

I had been using hard-coded for my mshtml doc, but leaving the dialog to "float" as "default," which I assume means it picks up the color from Windows.

By hard-coding the dialog's color as well, I now get the right rendition in both environments.