Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MonitorBrightness (Screen Brightness DDC)

A lightweight, native Windows C++ application to control physical monitor brightness and contrast directly via Hardware DDC/CI (dxva2.dll) with a modern Windows 10/11 Quick Settings flyout interface.

Platform Language Size License

Language / ภาษา: English | ภาษาไทย


🌐 English

🌟 Key Features

  • True Hardware DDC/CI Control: Directly communicates with your monitor's internal controller over DisplayPort, HDMI, or DVI to dim the actual LED/CCFL backlight power (just like ClickMonitorDDC).
  • Proportional Contrast Scaling: Uses your monitor's baseline calibrated contrast as the 100% cap and scales contrast down alongside brightness towards 0% for deep, eye-friendly night dimming without washed-out highlights.
  • Reset Base Contrast Button (↺ Reset Contrast): One-click recalibration to restore your monitor's default factory/OSD contrast setting.
  • Modern Flyout UI: Sleek, acrylic dark mode slider popup anchored right above the system tray.
  • Real-time System Tray Icon: Dynamic tray icon displaying the current brightness percentage in high-contrast amber/orange text.
  • Mouse Wheel Quick Adjust: Hover over the tray icon and scroll the mouse wheel to increment/decrement brightness by ±5% instantly.
  • Multi-Language Support (EN / TH): Toggle between English and Thai ([EN] / [TH]) directly in the header or via the tray context menu.
  • Global Hotkeys: Convenient keyboard shortcuts for instant adjustments anytime.
  • Auto-Start with Windows: Easily enable or disable startup on login with a single click.
  • Ultra Lightweight: Native Win32 + GDI+ implementation with zero external runtime dependencies (~145 KB executable, < 8 MB RAM).

⌨️ Global Hotkeys

Hotkey Action
Ctrl + Alt + ↑ or Page Up Increase brightness (+5%)
Ctrl + Alt + ↓ or Page Down Decrease brightness (-5%)
Ctrl + Alt + Home Reset brightness to 100%

🚀 Getting Started

1. Direct Run

  1. Download or clone this repository.
  2. Double-click ScreenBrightness.exe to run the app immediately.
  3. Left-click the tray icon to open the flyout slider, or scroll on the tray icon to adjust brightness.

2. Build from Source

To build using Microsoft Visual Studio C++ (MSVC):

build.bat

This compiles main.cpp into a standalone, DPI-aware ScreenBrightness.exe.


⚙️ Configuration (config.ini)

Settings are automatically saved in config.ini in the executable folder:

[Settings]
Brightness=50
BaseContrast=50
Language=EN


🇹🇭 ภาษาไทย

🌟 ฟังก์ชันและคุณสมบัติเด่น

  • สั่งหรี่หลอดไฟหน้าจอจริง 100% (Hardware DDC/CI): ส่งคำสั่งผ่านสายสัญญาณ (DisplayPort / HDMI / DVI) เข้าชิปจอโดยตรงผ่าน dxva2.dll เพื่อหรี่กำลังไฟของหลอด LED Backlight ด้านหลังจอจริง สบายตา ไม่เกิดแสงรั่ว และประหยัดไฟจริง (เหมือน ClickMonitorDDC)
  • ผูกค่า Contrast อิงตามค่าเดิมของจอ (Proportional Contrast): โปรแกรมจะอ่านค่า Contrast เดิมที่จอตั้งไว้เป็นจุดสูงสุด (100%) แล้วลดหลั่นลงมาพร้อมกับความสว่าง ทำให้เวลาปรับลงที่ 0% หน้าจอจะมืดสนิทลงได้ลึกที่สุดเท่าที่จอทำได้ โดยที่เวลาปรับ 100% จะไม่ดันคอนทราสต์จนภาพขาวโพลน
  • ปุ่มรีเซ็ตคอนทราสต์ (↺ Reset Contrast): กดเพื่ออ่านค่าจากจอใหม่หรือรีเซ็ตกลับเป็นค่าดีฟอลต์ (Default) ของหน้าจอได้ในคลิกเดียว
  • หน้าต่างปรับแสงโมเดิร์น (Flyout UI): หน้าต่างธีมมืด Dark Mode สวยงาม ลอยเหนือ Taskbar มุมขวาล่าง เลื่อนปรับได้ตั้งแต่ 0% - 100% พร้อมปุ่มลัดระดับแสงด่วน [0%] [25%] [50%] [75%] [100%]
  • System Tray Icon แสดงตัวเลข % แบบเรียลไทม์: ไอคอนที่มุมขวาล่างแสดงตัวเลขความสว่างสีส้ม/ทอง เด่นชัดข้างนาฬิกา
  • หมุนล้อเมาส์ (Scroll Wheel) บนไอคอน: เพิ่ม-ลดความสว่างหลอดไฟทีละ 5% ได้ทันทีโดยไม่ต้องเปิดหน้าต่าง
  • รองรับ 2 ภาษา (EN / TH): มีปุ่ม [EN] [TH] สำหรับสลับภาษาได้ทันที
  • เปิดเครื่องกดรันเองได้ (Auto-Start): ติ๊กถูกที่ช่อง "Start with Windows" เพื่อให้โปรแกรมเปิดพร้อมคอมพิวเตอร์อัตโนมัติ
  • น้ำหนักเบาเป็นพิเศษ: พัฒนาด้วย C++ Win32 Native ขนาดไฟล์เพียง ~145 KB และกินแรมน้อยมาก (< 8 MB)

⌨️ คีย์ลัดบนคีย์บอร์ด (Global Hotkeys)

คีย์ลัด (Hotkeys) การทำงาน
Ctrl + Alt + ↑ หรือ Page Up เพิ่มความสว่างหลอดไฟจอ (+5%)
Ctrl + Alt + ↓ หรือ Page Down ลดความสว่างหลอดไฟจอ (-5%)
Ctrl + Alt + Home ปรับความสว่างเป็น 100%

🚀 วิธีเปิดใช้งานและคอมไพล์

1. เปิดใช้งานทันที

  • ดับเบิ้ลคลิกไฟล์ ScreenBrightness.exe เพื่อเปิดใช้งานได้ทันที
  • คลิกซ้ายที่ Tray Icon มุมขวาล่างเพื่อเปิดแถบเลื่อน หรือหมุนล้อเมาส์บนไอคอนเพื่อปรับแสงด่วน

2. คอมไพล์ซอร์สโค้ด (Build from Source)

  • รันไฟล์ build.bat เพื่อคอมไพล์โค้ด main.cpp ด้วย MSVC C++ เป็นไฟล์ ScreenBrightness.exe

📄 License

This project is open source and available under the MIT License.

About

Lightweight Windows DDC/CI Hardware Monitor Dimmer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages