Welcome to edgylogic, drive:activated visitors. This is my new home on the net.


  • Display Brightness Vista Gadget

    UPDATE (18/12/2008): Fixed a small bug where displays with a maximum display level of less than 100 were not scaled properly for display in the gadget (see comments). Now v1.1.0.0.

    UPDATE (18/11/2008): I have added a download for the console app and code that adjusts the display brightness, as used by the gadget.

    What's this?

    Another Windows Vista gadget, that's what. It allows you to change your laptop's screen brightness with a click of the mouse from the sidebar.


    Once you install this gadget, just hover over it and it'll tell you the allowed brightness levels on your display. Click, and your monitor brightness will change. Simple.

    The process of changing the monitor's brightness may take a few seconds, so the sun icon on the gadget will blink to tell you it's doing something Smile.

    Sometimes the current brightness reported by the gadget may be different to the actual brightness because of changes by other actions/programs (e.g. disconnecting/connecting power, or using Windows Mobility Center to adjust). Just give it a minute or two and it'll update itself again. The gadget is still fully operable when it's out of sync.


    I got sick of having to call up the Windows Mobility Center each time I wanted to change my screen's brightness on my tablet (the keyboard function keys don't work unless I load the Toshiba Flash Cards thingy, which is nice when it works, but is slow and takes up too much memory).

    What are the technical tidbits?

    This gadget combines a bit of everything - javascript for the gadget logic, VBScript to get the monitor brightness details, and C# (.NET) to set the monitor brightness.

    Why javascript for the gadget logic? Because I like javascript better than VBScript when manipulating HTML elements (the real answer being I know more javascript).

    So why not use JScript to get the monitor brightness details? Because in the case of using access Windows methods and commands (and using WMI), I know more VBScript in that area and there is more support out there for it, given VBScript is Windows' main automation language (soon to be replaced by PowerShell I think).

    And finally, why another language to set the monitor brightness? Because neither VBScript or JScript can handle the 64-bit integers required by the WMI method (and there doesn't seem to be a workaround method available). So I wrote a small console app in C#, and the gadget's VBScript simply runs that and passes a parameter telling it what brightness level to set it to.

    Show me the goods!

    Just so you're sure - this gadget requires Windows Vista. It won't work on anything else.

    The download link is below - to install, simple double-click on the downloaded .gadget file. One more thing - if the file you downloaded does not end with .gadget, and instead ends with .zip or anything else, you must rename the file to end with .gadget or the gadget will not install. Otherwise, when you double-click on the file, you'll either see rubbish, or a zip folder full of XML, HTML and graphic files.

    As usual, drop me a note if you have any problems, or suggestions. And let me know if you want the source code/binary to the console app - the rest you can get by simply unzipping the .gadget file.

    Download: Display Brightness Vista Gadget

    But I want the stuff behind-the-scenes!

    I've gotten a few requests on code that does the heavy lifting, particularly the C# console app, so here it is -  Display Brightness Console App. This is not required for the gadget to work.

    Both the code (C#) and the compiled exe are in the zip file. You will need the Microsoft .NET Framework 2.0 or greater for the app to work (Vista comes with 2.0 out of the box). It will only work in Windows Vista - as far as I know, there is no standard way to change display brightness programmatically in Windows XP.

    To use the console app, the following parameters are allowed:

    • DisplayBrightnessConsole.exe
      This will return the current brightness level.
    • DisplayBrightnessConsole.exe -getlevels
      This will return all possible brightness levels accepted by the display, separated by a new line.
    • DisplayBrightnessConsole.exe 20 (or some other brightness level number)
      This will set the brightness level of the display to the parameter given, in this case, 20.

    The code currently only works on single-display systems. If your system has more than one display, it will only work on the first (generally primary) display. It should be fairly easy to modify it to support more.




My Toshiba laptop is on windows vista. Whenever I switch on the screen has always been brighter than I would like. Controlling brightness from the Vista is slow. I downloaded the windows vista gadget and found it works faster. I am impressed by your initative.

Posted by Misheck Gatana, 21st November 2007 6:45 AM


You can permanently change the default brightness of your Vista laptop - rather than change it each time via the gadget or Windows Mobility Center.

To do this, go to Control Panel -> Power Options. Then down the left side, click on adjust display brightness. Change the setting there and press save changes. The setting you set there will now be the default brightness of your display.

Posted by [edgylogic] Sam, 24th November 2007 2:13 PM

Thank's for this program it saves me a lot of time ,and it's one of my favorites, thank's agin very useful

Posted by Wayne, 17th February 2008 3:13 PM

Yea, you can dim your screen quickley when you step away from your computer, and save your laptop screen from burning out, lasting longer.


Posted by Meshue, 17th February 2008 3:17 PM

iam using sony vaio, still the brightness is not controlled. Can anyone help ??

Posted by Sunil, 4th March 2008 11:19 PM

Thank you very much Sam. Your suggestion completely addressed my issue.

Posted by Faisal, 5th March 2008 5:21 AM


Do you see the different available brightness levels in the gadget (move your cursor over it from left to right and see if the numbers change)?

Posted by [edgylogic] Sam, 12th March 2008 5:19 PM

It seems like it has a great lot of potential. Since my tablet has a small screen, if you can make the gadget smaller in size, that would be great. I, and I expect some other people, would appreciate it a great deal!

Posted by Amitabh, 11th April 2008 8:47 PM


Why not just make the download file a .gadget extension,  or put a readme file in the .zip file, I figured it out when I came back and read what I should have before downloading, lol.   I think for some new vista users, they may not know how to change extensions.  Thank you again, this will be my most used gadget.  

Posted by chris, 12th April 2008 2:53 AM


Posted by saad, 13th April 2008 12:08 AM

i have tried run it, but it doesent work, it just opens a CMD console and closes allmost imediatly, what can i do??

Posted by Alonso, 17th April 2008 3:00 AM


It actually does have a .gadget extension, except my blog software was too smart for its own good, detected it's a zip file and tells browsers it's that instead.

I was too lazy to work out how to fix it before, but I've finally done it. The download should work fine now.

Thanks for prodding me into action :)


Try downloading it again - you might have downloaded a mangled copy due to the problem above.

Posted by [edgylogic] Sam, 19th April 2008 10:07 PM

Hey Sam,Downloaded your gadget because I have no "brightness tile" in mobility center(Latitude 630). Your tile, on my sidebar, has no sunshine. Just a black rectangular box. Help!

Posted by Tim, 27th May 2008 1:11 AM

Hey Sam,Downloaded your gadget because I have no "brightness tile" in mobility center(Latitude 630). Your tile, on my sidebar, has no sunshine. Just a black rectangular box. Help!

Posted by Tim, 27th May 2008 1:11 AM


Hmm, from what I can gather, your machine has an ambient brightness sensor that is designed to change the display brightness automatically. Dell may have set up your computer such that it overrides the standard way of changing display brightness, rendering the widget useless.

From what I can gather in the following paragraph, using Dell's Quick Set software maybe the only other way to change your display brightness. Or maybe there are buttons on your keyboard that do the same?

"One unusual feature of the D630 is also related to the display, with a light sensor embedded into the bezel allowing for automatic adjustment according to the brightness of your environment. Dell's Quick Set software allows you to change your preferences, creating maximum and minimum preferred brightness levels, and all in all it's a nice time saving feature for everyday use."

Posted by [edgylogic] Sam, 3rd June 2008 3:36 PM

Hey Sam.  I love this option!  Using my computer in different light or at different times of the day requires different brightness.  I have been using this since the first of the year and have not had a single problem with it until yesterday.  It just stopped working.  It shows up blank and doesn't say anything about what's wrong.  I have reloaded it and still no luck.  Any ideas?

Posted by Ryan, 14th July 2008 6:50 AM


Have you tried rebooting the computer? No external monitor connected? If it shows up blank (i.e. a grey box), it means it can't read the valid brightness levels from your computer. Sometimes Windows just refuses to co-operate :)

It randomly occurs on my system, so it's hard to fix.

Posted by [edgylogic] Sam, 14th July 2008 7:40 PM

Hey Sam!  I rebooted the computer a bunch of times and finally just gave up for a few days.  When I came back and tried to use it again, it worked! I guess it was just windows refusing to co-operate like you said.  Working fine again!  Keep up the good work and thanks for the quick response!

Posted by Ryan, 18th July 2008 5:42 AM

Exactly what I was looking for and works sooooo well.  Thank you so much!!!!

Posted by Stephanie, 5th September 2008 6:37 AM

tidak ada

Posted by ika, 20th September 2008 12:23 PM

tdk ada

Posted by ika, 20th September 2008 12:24 PM

Thank you for writing this gadget.  I don't use the sidebar myself, but your DisplayBrightnessConsole.exe is a very useful little program.  I plan to use it with another program called "AutoHotkey" To use my FF/Rew keys to change brightness.  The fact that it returns the current brightness (or zero) is extremely useful.

Posted by ave0000, 10th October 2008 2:44 AM

it doesnt work for me i installed it and its balnk on the side bar plz help me

i had windows xp and then changed it to vista eveything works good execpt tht my Fn buttons dont work and my screen is really dim

Posted by chris, 15th October 2008 10:53 AM

Chris -

Does the brightness control work inside the Windows Mobility Center (Start -> Programs -> Windows Mobility Center)?

ave0000 -

People seem really interested in that exe and the code. I'll be posting it up separately later, so it's easier to find.

Posted by [edgylogic] Sam, 18th October 2008 2:24 AM

This is fantastic, exactly what I needed!! Thank you so much, you're a genius! :)

Posted by Jo, 13th November 2008 2:23 PM

It appears that my brightness controls on my Motion LE1700 tablet go from 0-15 (not 0-100). The gadget works perfectly, but it's a small slider area. Any way to change it so 0-15 covers the whole thing? or make 0-100 relative to 0-15?

Posted by Gregory, 23rd November 2008 7:01 AM

forgot to add my email for follow-up...

Posted by gregoryx, 23rd November 2008 7:05 AM

Hi! i was using your amazing gadget on vista, i have a vaio, and i found it very useful for me, but now i downgraded my vaio to xp, and your gadget not works, i know... the sidebar, but the console app also doesn't works.... would you port your application to xp????...or make a little GUI on xp...PLEASE!!!!... i know i'm talking for everybody who owns a vaio.... thank you, in advantage...

I'll stay tunned for your answer...


Posted by German Velasquez, 1st December 2008 1:48 PM

I have downloaded the gadet it is on my side bar but does not work just a black screen. I have vista and in the mobility center there is no brightness box either. My laptop is a samsung q45 and the brightness used to work with fn hot key and arrows. My screen is dim all the time now. Sometimes comes bright but then if I go to battery mode it goes dim again. thank you so much please help me.

Posted by lamoor, 6th December 2008 5:49 AM


Are you sure the console app doesn't work? What happens instead, any errors? You do need to have .NET Framework 2.0 installed by the way (it comes pre-installed on Vista).

I'm unlikely to do anything on XP, because the keyboard adjustment support is what I'd rather use on that. A crude way of making things easier would be to get the console app working (should work), and then create shortcuts for every brightness level, put them in a folder, and dock it to your start menu.


Weird. Did it ever work? Have you updated the video or display drivers lately? Check that there are no problems in your device manager (Start -> Control Panel -> System -> Device Manager). You can adjust the default brightness in both power and battery mode in Start -> Control Panel -> Power Options -> Adjust display brightness.

Posted by [edgylogic] Sam, 14th December 2008 8:00 PM

Hi, i was reading on the internet and the why the app doesn't works on xp is: MS had changed all the routines of the framework, xp is different to vista on some commands, in MSDN you can found this, i don't remember the link, but you can find it there, i was trying to modify your source code, but no success... .NET and me aren't friends... more likely perfect unknowns....jajajaja, thank you for the solution, i'll try it. Another solution is, have you think about to port  your gadget to yahoo widgets?? could be a useful solution... sorry for not to send you the MSDN link, but i'm on a hurry! i'll be tuned here!.

Posted by German Velasquez, 15th December 2008 1:26 PM


You're right - the method of accessing and changing the display brightness I'm using only exists in Vista. Before Vista, there was no standard way of changing display brightness in Windows. So it'll probably be fairly difficult to do something similar on XP that works on many displays.

Looks like you'll have to stick with the tool than came with your laptop :(

Posted by [edgylogic] Sam, 19th December 2008 7:13 PM

I have problems with my Windows Mobility Center, don't show me the brightness control. Do you know as resolve this problem?

Posted by Edio, 6th January 2009 7:08 AM

thank you very much. im new in vista so it was kinda a revelation to find out (my one of the above comments) that brightness was hidden in power settings.. anyway. Great gadget, thnx for sharing

Posted by Teo T, 2nd February 2009 2:15 AM

I just downloaded it and avira sent it to quarantine due to some malicious code. What were you trying to pull with this one, you naughty boy?

Posted by Drake Sol, 10th February 2009 12:06 PM

Drake Sol:

I just ran the file through VirusTotal (www.virustotal.com/.../10a04432c9eb53c1ccc08c2110eb797c) - the website scans files using a range of antivirus programs - and it confirmed what you said, i.e. Avira is reporting a virus. If you visit the analysis page though, notice that only Avira and SecureWeb-Gateway are reporting a virus, HTML/Rce.Gen and Heuristic.Script.Rce (different names for the same thing).

If you look at the virus description (www.avira.com/.../html_rce.gen.html) you will see that it thinks it has found a virus because it found code that reads and modifies system properties using scripts in a HTML file. Nothing specific, just something that could be bad.

And normally, that is bad. However, Vista gadgets are written in HTML, and in this case, the code needs to read and modify system properties in order to show and change the display brightness.

I'm confident the code won't do anything destructive, and I'm also sure that no viruses have crept into the gadget.

But at the end of the day, it's up to you. I can't say/do anything more to make you trust the download. I also can't change the way the gadget works to bypass this warning, because it is the only way to do it with Vista gadgets. I suspect other gadgets which change system properties/behaviour will get a similar warning.

Posted by [edgylogic] Sam, 11th February 2009 12:22 AM

i have a problem with my acer aspire corporated with microsoft windows vista home premium. after i use it about 2 month the display changing to over brightness. i tried 'everything' in the way to make it back to the beginning i buy it but nothing happened. do you have any suggestion?

Posted by dante, 30th April 2009 10:08 PM
Posted by Praveen, 10th May 2009 9:35 AM

works flawlessly with my sony vaio.

good job!!

Posted by alexander, 31st May 2009 8:16 AM

Its fine.Everett

Posted by Everett, 7th November 2009 10:56 AM

Its fine.Everett

Posted by Everett, 7th November 2009 10:56 AM

Good gadget. Worked on W7.

Posted by Yorgen, 15th November 2009 8:58 AM

Thank you very much for this excellent app and gadget, my notebook is a vaio vg-cr150 and sony does not have support for windows 7 (the fn keys does not work)... this worked like a charm!!!

Posted by Fernando, 18th November 2009 2:07 PM

Thank you very much for this excellent app and gadget, my notebook is a vaio vg-cr150 and sony does not have support for windows 7 (the fn keys does not work)... this worked like a charm!!!

Posted by Fernando, 18th November 2009 2:07 PM

I'm lovin this ap.  I loaded win7 on my vaio and the hotkey drivers were not available for the 64 bit upgrade I did. I had to click on the dumb little battery and select change screen brighness everytime before this.


Posted by MIke, 24th November 2009 1:52 AM

works on 7 vaio jst fine....good utility to have....superb...

Posted by devesh, 16th December 2009 6:40 PM

good job ...i love it

Posted by ady, 10th February 2010 10:22 PM

Would it be possible to add a function to Enable or Disable the Ambient Light Sensor (ALS) in Windows7? Microsoft says using any manual brightness setting disables ALS, and it must be manually re-enabled to get control again. I have your gadget set up in AutoHotkey to force manual brightness changes, but I can't find a way to use AHK to switch back to ALS. Actually what I see on my Motion J3400 is that they compete with each other (unless the manual setting is all the way up or down, which seems to lock out ALS), so there may be more going on...  Any Thoughts?

Posted by Loren Amelang, 28th February 2010 8:44 AM

Sam, you ROCK.  This gadget has saved what remains of my hair from being torn out - it was driving me nuts having to fish around in Windows 7 Mobility Center (yep, it's a problem in Win7 as well).

Just one question.  One of my laptops doesn't allow me to change the brightness at all; all the options are gone, even from Mobility Center. Used to work fine though so it's not a hardware issue.  Your gadget also doesn't work on this laptop.  Any ideas where the problem could lie?

Cheers, Dan

Posted by Daniel, 8th March 2010 12:30 AM

Sam, I can't get it to work on Asus T91 with Win7.  It shows levels 1 - 15, yet when I use the keyboard function key to set maximum brightness, your gadget reports 71.  If I use your app to set the brightness to 71 it still only stays at 15.

Am I doing something wrong? Is it incompatible with Asus drivers?

Posted by Ian, 8th March 2010 9:37 AM

Lately, the gadget still works for adjusting the brightness but not for displaying the current brightness level (adjusted via another control). Is there a fix? Windows Mobility Center brightness meter still works properly. I'm running Windows 7 x64 with Mobile Intel Graphics Series 4.

Posted by Seth, 16th March 2010 7:51 AM

As Seth said, it looks like the desktop gadget doesn't see changes made by other methods. I'm using AutoHotKey to trigger your ConsoleApp to change brightness, which saves my sanity dozens of times a day. I hadn't noticed that the gadget display doesn't follow along.

Not sure if it ever did. It just sits there at the setting in use when it opened. It still also changes brightness, and reports its own changes correctly, except I can't set it to zero! Ten is the lowest setting it makes available. Zero works fine from the ConsoleApp.

Motion J3400 tablet, LCD backlight, 32-bit Win7pro.

Want a strange bug? In Google Chrome, I can't place the cursor in the bottom two lines of this pane by clicking! The pointer reverts to the selection arrow when I go below the third line up. I can click up there and use arrow keys to bring the cursor down...  

Except now after scrolling back to the top of this pane and then back down, the cursor behaves normally! Maybe you have to type more to auto add more lines? Well, not so far...  

I give up - can't reproduce it. But it was definitely happening!

Posted by Loren Amelang, 16th March 2010 8:26 AM

Works well on HP Touchsmart tm2 win 7 - perfect for adjusting brightness easily whn in tablet mode!  If you ever decide to improve it, would be worth having options to change size, maybe have a small slidebar, and also to change colours.  Well done!

Posted by Aman, 3rd May 2010 7:40 AM

Actually one minor bug - if brightness is changed by system (e.g. on changing power plan) or by me using physical brightness keys or system softrware, the brightness in the gadget does not change to match.  Still, only a minor bug and still a useful app :-)

Posted by Aman, 3rd May 2010 7:52 AM

Actually, minor bug - if the brightness is changed by the system (e.g. power plan change) or using the system software or hardware buttons, the gadget brightness does not change to match (e.g. still shows 80% even when lowered).  No real matter though, still a simple yet very useful app :-)

Posted by Aman, 3rd May 2010 7:54 AM

Actually, minor bug - if the brightness is changed by the system (e.g. power plan change) or using the system software or hardware buttons, the gadget brightness does not change to match (e.g. still shows 80% even when lowered).  No real matter though, still a simple yet very useful app :-)

Posted by Aman (again), 3rd May 2010 7:55 AM

Actually, minor bug - if the brightness is changed by the system (e.g. power plan change) or using the system software or hardware buttons, the gadget brightness does not change to match (e.g. still shows 80% even when lowered).  No real matter though, still a simple yet very useful app :-)

Posted by Aman (again), 3rd May 2010 7:55 AM

Love it Love it Love it!! Works beautifully. I'm running Win 7 x64 and have no problems at all. Thanks!!!

Posted by Beckey, 26th October 2010 4:16 PM

awesome, that's exactly what I was looking for. using it on windows7 64bit, works flawlessly. one thing tho, it would be great if there was a way to change its appearance. I would like it to be smaller and/or easier on the eyes, ie. in some kind of gray/opaque style, not bright green.

Posted by rxzlmn, 16th May 2011 3:26 AM

Thanks, this is wonderful, I build the console app and now I don't have to mess with the nasty GUIs!

Posted by Dougie, 31st July 2011 12:14 AM

I can't believe how easy your gadget fixes something so annoying! My latest Vista or Windows update this week (I believe) made for an additional user step in adjusting screen brightness. Now brighness is more exclusively linked to current power source. Thanks for your sharing your  ingenuity!

Posted by Julie, 22nd September 2011 12:53 PM

Hi,  i got an annoying problem, it stop working after a driver issue(not related to screen whatsoever), now i can still add the gadget but it does nothing, i can go into the options, or move the gadget etc, it just look like it is disabled for some reason,

it there a specific way to uninstall it? i use some other gadgets that needs special uninstaller so i wonder if that was the case for this one.

Very nice gadget, i used it for long time before this issue.

Posted by akem, 8th October 2011 2:25 AM

Congratulations: Works fine in my Asus N55SF Gadget is Ok, Cmd Line is so OK (checking 2 versions).

All is good from me.

Regards and than's

Posted by Jpt, 30th October 2011 11:38 PM

Thank you, thank you, & thank you... :)

I have something else to know.

actually sony vaio brightness function key  was not working when i loaded win 7 ulti...

but i found this gadget properly working on it!!!

is there any problem in it?

an using win7 ulti. 32. on sony vaio.

please send me if you have any suggestion maasum@live.com

Posted by Maasum, 17th January 2012 4:23 AM

amazing, thank you! Sony Vaio vpcel windows 7-64.

Posted by zackn9ne, 17th February 2012 8:17 AM

Congratulations, this is just what I needed. Using it on a vaio series W with w7 ult and it works fine. The only thing is you can only go from 4, 16, 28, 40, 52, 64, 76, 88 and 100, you cannot go to values in between. But that is enoughfor me. Perfect tiny tool. Thank you. 

Posted by Alejandra, 20th April 2012 11:19 PM

Thank you so much for this! This is easily one of the most useful gadgets out there. My brightness function keys rarely work on my laptop, this is perfect. Thanks again!

Posted by Kate, 27th June 2012 7:10 AM

sony dont work screen-work just widget

Posted by serge, 8th August 2012 8:52 PM

Thank you for this gadget.

Posted by jess21, 30th September 2012 7:39 AM

I have a HP Compaq laptop and gadget perfectly functioning. Very convenient to adjust the brightness, instead of using the FN-key + F9 or F10.

Thanks for your handy gadget!

Posted by Serge, 4th October 2012 11:51 AM

Works on my win7 32bit Hp Elitebook 8440p laptop. THANK YOU!

Posted by Kevin, 27th November 2012 11:40 AM

Thanks for this. Works great on an HP TouchSmart that refuses to remember my brightness settings. As soon as it reboots and I login, it goes back to the lowest setting.


I now have a shortcut in the startup folder to the command line version to reset it back to where I left it in the power options in the control panel.

Posted by NK5, 21st December 2012 8:49 AM

Good gadget. Worked on W8.1 also.

Posted by Pratik Jaiswal, 3rd August 2015 8:27 PM

Leave a comment