|
-
Mar 9th, 2009, 09:12 AM
#1
Thread Starter
Frenzied Member
Dim the laptop screen.
I have a laptop and will be spending a lot of time running it off a power inverter in my van.
When the laptop is running on it's own battery the screen dims to use less power.
But when running off the inverter the screen uses the full brightness.
Is there some code that will let you set the screen to the lower power setting even when the comp thinks it's running on house current?
-
Mar 9th, 2009, 09:54 AM
#2
Re: Dim the laptop screen.
Is there a particular reason you want to use code?
You can set it via Control Panel (under "Power Options" I think).
-
Mar 9th, 2009, 11:34 AM
#3
Thread Starter
Frenzied Member
Re: Dim the laptop screen.
 Originally Posted by si_the_geek
Is there a particular reason you want to use code?
You can set it via Control Panel (under "Power Options" I think).
I've looked there, there's only an option to turn off the monitor after x minutes.
I would like to be able to toggle the dimming of the screen.
-
Mar 9th, 2009, 12:11 PM
#4
Re: Dim the laptop screen.
I don't know about you, but my laptop came with hot keys to control that .... what you need to do is set the brightness when it's plugged in... when it becomes unplugged, it'll switch to the "dim" mode... when you plug it back it, it should remember the dimness setting from the last time it was plugged in and restore it.
-tg
-
Mar 9th, 2009, 12:15 PM
#5
Thread Starter
Frenzied Member
Re: Dim the laptop screen.
 Originally Posted by techgnome
I don't know about you, but my laptop came with hot keys to control that .... what you need to do is set the brightness when it's plugged in... when it becomes unplugged, it'll switch to the "dim" mode... when you plug it back it, it should remember the dimness setting from the last time it was plugged in and restore it.
-tg
I hadn't thought of that one, there are function keys for setting the screen brightness.
Thanks for the help!
I'm leaving this open for now, it still could be handy to have code for doing it.
-
Mar 10th, 2009, 03:02 AM
#6
Re: Dim the laptop screen.
You can do it using sendmessage. here is an example
something like this... needs little bit of tweaking. this code puts the monitor off...
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Any) As Long
Private Const SC_MONITORPOWER = &HF170&
Private Const WM_SYSCOMMAND = &H112
Private Sub Command1_Click()
Call SendMessage(Me.hWnd, WM_SYSCOMMAND, SC_MONITORPOWER, ByVal 2&)
End Sub
Last edited by Siddharth Rout; Mar 10th, 2009 at 03:23 AM.
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 10th, 2009, 04:24 PM
#7
Hyperactive Member
Re: Dim the laptop screen.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|