By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,857 Members | 1,813 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,857 IT Pros & Developers. It's quick & easy.

Make web pages show up as black and white

P: n/a
JCL
I have a winform and on this winform, I have a WebBrowser control. Users can
browse the web through this form. Is there a way that I can make web pages
show up as grey scale pages, with the color being converted to black and
white? In this way, users will always see a colorless web page when they
access to the internet.

Thank you,
Chris
Nov 17 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Chris,

There isn't any way offhand that I can think of, short of traversing the
object model and trying to set the color on all elements. However, given
the number of elements, as well as styles that can be applied to them, it's
pretty daunting.

Maybe there is a way to do this through the accessibility layer, but I
seriously doubt it.

If you don't require interaction, you could create a bitmap of the
window contents and then greyscale the bitmap and show that.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"JCL" <re******@verizon.net> wrote in message
news:cTVte.3319$1q2.2506@trnddc01...
I have a winform and on this winform, I have a WebBrowser control. Users
can
browse the web through this form. Is there a way that I can make web pages
show up as grey scale pages, with the color being converted to black and
white? In this way, users will always see a colorless web page when they
access to the internet.

Thank you,
Chris

Nov 17 '05 #2

P: n/a
I cant help you I'm afraid, but why would you want to do this?
Nov 17 '05 #3

P: n/a
JCL
The application owner wants it to imitate windows behavior. When you try to
shut down windows, the screen will change to black and white. When the
users' internet session is going to expire, the screen color changes to
black and white. That way, the users know that they need to hurry up to
finish their session. But during this black and white period, users can
still interact with web pages.

Please help!

"Josh" <s@a.com> wrote in message
news:ef*************@TK2MSFTNGP15.phx.gbl...
I cant help you I'm afraid, but why would you want to do this?

Nov 17 '05 #4

P: n/a
JCL
Thank you, Nicholas. But I do need interaction of the pages. Making it a
greyscale bitmap won't work.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eY**************@TK2MSFTNGP10.phx.gbl...
Chris,

There isn't any way offhand that I can think of, short of traversing the object model and trying to set the color on all elements. However, given
the number of elements, as well as styles that can be applied to them, it's pretty daunting.

Maybe there is a way to do this through the accessibility layer, but I
seriously doubt it.

If you don't require interaction, you could create a bitmap of the
window contents and then greyscale the bitmap and show that.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"JCL" <re******@verizon.net> wrote in message
news:cTVte.3319$1q2.2506@trnddc01...
I have a winform and on this winform, I have a WebBrowser control. Users
can
browse the web through this form. Is there a way that I can make web pages show up as grey scale pages, with the color being converted to black and
white? In this way, users will always see a colorless web page when they
access to the internet.

Thank you,
Chris


Nov 17 '05 #5

P: n/a
JCL,

Quite honestly, I don't think this is going to be possible. You should
point out that when the dialog asking you in XP if you want to log off comes
up, there is nothing that is interactive. What Windows does is take a
snapshot of the desktop, and then greyscale that. Nothing changes while
that dialog is up.

The only way you could duplicate this is to show a dialog in the same
way, but before you do, show a bitmap in place of the webbrowser control.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"JCL" <re******@verizon.net> wrote in message
news:YzWte.8161$tG.6646@trnddc05...
The application owner wants it to imitate windows behavior. When you try
to
shut down windows, the screen will change to black and white. When the
users' internet session is going to expire, the screen color changes to
black and white. That way, the users know that they need to hurry up to
finish their session. But during this black and white period, users can
still interact with web pages.

Please help!

"Josh" <s@a.com> wrote in message
news:ef*************@TK2MSFTNGP15.phx.gbl...
I cant help you I'm afraid, but why would you want to do this?


Nov 17 '05 #6

P: n/a
Dear Chris,

Is there any way to redirect the output of a window to a bitmap without
having it on screen? You can definitely capture bitmaps of a window when
they are visible (a la snapshot), but can you do it offscreen, or behind
another window, possibly in C++, using windows or other APIs? (Question
directed at you or others, of course. I don't have my MSDN handy! ;o) )

If you can, then you might be able to do that, greyscale it, display it, and
then capture various events or windows Messages in your display control with
the greyed out bitmap, and pass them on to the actual hidden browser
control, refreshing the bitmap whenever something changes in the browser
window (possibly capturing relevant effects), or on a fixed interval.

It might work.... or I might be dreaming... ;o)

Either way, it sounds like a lot of work for an effect that could be
replaced with some sort of banner control, perhaps above or below or over
the browser, or (more annoyingly) MessageBox reminders.

Hope that helps

James CC
Nov 17 '05 #7

P: n/a
Dear Chris,

I was thinking about this, and, to get a similar but different result, you
could put a semi-transparent window or maybe control in front of the
browser, and then pass on the events and messages as mentioned in my last
post. That should partially grey out the browser.

Hope that helps,

James
Nov 17 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.