How to make screen become gray/dark slowly?
-
For a WinForm application using C#, how to make the form become gray/dark slowly when pop up a dialog? Like XP does when user is going to shut down computer. Thanks in advance.
Just open a form maximized with no Titlebar. Make the background of the form black. Use Opacity of the form below 50, and show the dialog above the form. I think you will find the same effect. ;)
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
For a WinForm application using C#, how to make the form become gray/dark slowly when pop up a dialog? Like XP does when user is going to shut down computer. Thanks in advance.
Check this article A modal dialog that fades the background to gray-scale imitating the XP shutdown screen[^]
"Never put off until run time what you can do at compile time." - David Gries, in "Compiler Construction for Digital Computers", circa 1969.
-
Check this article A modal dialog that fades the background to gray-scale imitating the XP shutdown screen[^]
"Never put off until run time what you can do at compile time." - David Gries, in "Compiler Construction for Digital Computers", circa 1969.
Is it at all required to produce Grayscale using Bitmap when you can do this easily using Opacity of a form ?? :doh:
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
Is it at all required to produce Grayscale using Bitmap when you can do this easily using Opacity of a form ?? :doh:
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
How can you turn other windows gray by setting opacity of the form?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
Just place the transparent form(with black background) over all other window and set opacity to a value less than 50%... maybe it could animate the opacity from 0 to 50.... It will be done automatically... :)
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
Just place the transparent form(with black background) over all other window and set opacity to a value less than 50%... maybe it could animate the opacity from 0 to 50.... It will be done automatically... :)
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using JavascriptAbhishek Sur wrote:
It will be done automatically...
Actually no. Just tested it and you can still see the colors of the underlaying windows. All this does is put a grayish 'film' over it but the colors of any window behind it are still very visible.
-
Just place the transparent form(with black background) over all other window and set opacity to a value less than 50%... maybe it could animate the opacity from 0 to 50.... It will be done automatically... :)
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using JavascriptNo. That wont turn the title bar of the windows behind to gray. Background windows will still be olive green (as per my system settings). You need to use similar mechanism as what XP uses or digg in to Nish's article. Since it is in C++, I don't get much out of it.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
-
Abhishek Sur wrote:
It will be done automatically...
Actually no. Just tested it and you can still see the colors of the underlaying windows. All this does is put a grayish 'film' over it but the colors of any window behind it are still very visible.
Ohh... is it .. Thanks for letting me know this. I didnt tried that. Thought it would be done this way. Cheers.:rose:
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
No. That wont turn the title bar of the windows behind to gray. Background windows will still be olive green (as per my system settings). You need to use similar mechanism as what XP uses or digg in to Nish's article. Since it is in C++, I don't get much out of it.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
d@nish wrote:
Since it is in C++, I don't get much out of it.
You might look this then http://techneighbour.co.cc/blog/2009/09/dialogbox-imitating-windows-shutdown-dialog/[^] Well... But there is lots of Double buffering, Timers, Bitmaps etc. I think this would be a lots of load for this simple task. :laugh: :laugh: . dont you think ? :^) Anyway, I agree background colors will appear as it is for my solution... ;P
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript -
d@nish wrote:
Since it is in C++, I don't get much out of it.
You might look this then http://techneighbour.co.cc/blog/2009/09/dialogbox-imitating-windows-shutdown-dialog/[^] Well... But there is lots of Double buffering, Timers, Bitmaps etc. I think this would be a lots of load for this simple task. :laugh: :laugh: . dont you think ? :^) Anyway, I agree background colors will appear as it is for my solution... ;P
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using JavascriptWell, if you need replica of XP feature, AFAIK you got two ways: 1. Find how windows does that and maybe P/Invoke the dll. 2. Use what is there in the article. If you can settle with ModalPopUp (Ajax) like background, use a Panel and play with its AlphaGradient. Or use a new form as you suggested.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
-
Well, if you need replica of XP feature, AFAIK you got two ways: 1. Find how windows does that and maybe P/Invoke the dll. 2. Use what is there in the article. If you can settle with ModalPopUp (Ajax) like background, use a Panel and play with its AlphaGradient. Or use a new form as you suggested.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
Right... :rose:
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript