How to adjust the brightness of the screen on notebook displays - windows

I have a slide bar to adjust the brightness of the screen on notebook displays in my application, but I found those articles from internet are adjusting the Gamma value, the behavior is not really like pressing the special key in keyboard. Is there a way to do it? Thanks in advance.
Here is some links what I found.
http://www.codeproject.com/KB/miscctrl/gamma_manager.aspx?display=PrintAll
http://mycomponent.blogspot.com/2009/05/set-screen-brightness-in-c.html
http://social.msdn.microsoft.com/Forums/en-US/sidebargadfetdevelopment/thread/8fd043fd-79fb-4d91-ad17-0d109f893331

Very unikely that there is a way to do it with software - it's probably controlled by the laptops BIOS, which windows will not have hooks into.

If your app is for Linux you could see how the Screen Brightness applet works by looking at the code.

Related

How can I have Gnome terminal effects for XFCE?

Surely, this is documented somewhere. I for some reason or another cannot find the answer for this.
Most people are wanting to make their terminals completely transparent, I however want the effects where you see the desktop background. I am certain that this is default for gnome. What is this effect called and How can I get this in XFCE?
I was told that installing something like Terminator would resolve this but its just the true transparency which looks messy with a ton of windows and stuff going on.
Here is an example of what I am wanting for XFCE.
http://i.imgur.com/zy1EBdS.png
Thanks in advance !
The simple way could be opening your xfce4-terminal and going to Edit->Preferences->Appearance->Background and then chose a Background image to show instead of a Solid Color or Transparent. In example.
In the Xubuntu version that I have solved this issue accidentally. I had to go to manage settings menu -> Window Manager Tweaks -> Compositor(tab)
and uncheck Enable Display Compositing
Now I can have the terminal just show the desktop background instead of every thing that is messy behind it.

Show the Windows 8 brightness slider via native c++

I'm working on an app where I need to change the brightness. However, I want the user to be aware of the relative brightness by seeing the built in brightness slider they're used to. Also- this designed to run only on laptops or tablets so the displays should support programmatic brightness.
*Note: This image was stolen from this post.
I was hoping it would automatically show up when I changed the brightness programmatically but no luck there. I tried doing so with WmiSetBrightness() and with PowerWriteACValueIndex() but neither of them showed the slider.
TL;DR I want to programmatically invoke the slider to show the user what the current brightness level is. Any ideas?

Is there a way to change the windows phone 7 emulator orientation in runtime

Is there way to change the orientation of the emulator in runtime.
I have some tests for a component which include different layouts based on orientation. It would be great if this is possible.
I'm not sure what you are asking for?
If you just want to change the orientation yourself, then use the mouse - there's some buttons top right on the emulator to change orientation - http://msdn.microsoft.com/en-us/library/ff402568(v=VS.92).aspx
If you want to automate this, then since I'm not sure there's a keyboard shortcut or command line for this, then you could just about do it by modifying the code inside https://github.com/Expensify/WindowsPhoneTestFramework/
Alternatively... it might be quicker/easier to just hack your own code to set the supportedorientation of each page just for one-off testing.
Late response (translated by google), but can be useful for others.
Management guidance on this in the options bar to the right of the emulator:
Detail to know, so that the orientation is done properly and is taken into account, we must re-press the "pause" button if you did previously to use your keyboard. Otherwise, you will feel duty systematic tilt your head to the left or right. :)

Animate Windows Wallpaper with QT

i want to make an animated wallpaper for windows. So far i have only expreience with Mac OS X programming and i'm new to windows. So i decided to work with QT because it seems that there is more help out there.
Until now i have created the app in a borderless window in qt. It work quiet fine.
But is there a way in QT to change the level of the window so that its appear above the windows wallpaper but behind the icons?
EDIT:
Ok if found a simple solution.
After some testing with the hints form kusg1 I figured out when there is a transparent window mouse events going still to the desktop.
I actualy want have this website has wallpaper: Ticketack. - So i created a frameless window which stays on bottom and has a transparent background and displays the text. Beside this i can change the windows wallpaper directly to get the background of the clock.
So clock text is not behind the icons but i think this will be ok.
Just some ideas: Use the windows flag as Qt::Window | Qt::FramelessWindowHint + Windows Stay at bottom hint, and set the content of the widget with your animated content (the suitable candidate is to use QGraphicsView).
The widget needs two main tasks:
Upon launching, it grabs the desktop background as pixmap and do overlay with the animated content (this needs to have the desktop to be wallpaper-less for simple scenario).
The widget needs to capture mouse and focus event and channel back to actual window command if the user wants to click the icon on the desktop.
Update:
Some pointers for the implementation:
For managing desktop icon, there is a good article here! (also found from SO).
Qt example and demos has an example on the taking desktop snapshot, the snippet is: QPixmap::grabWindow(QApplication::desktop()->winId());
Answer to your question: no, there isn't.
However, you can try something like this using Windows API: How to draw directly on the Windows desktop, C#?

Screenshot of window

I'm trying to take screenshots of all open windows, also the minimized ones. Currently I'm using this code:
http://www.developerfusion.com/code/4630/capture-a-screen-shot/
But it doesn't work for minimized windows and the areas where there is a Glass effect since Vista like the explorer title bar are black. Can anyone help me out?
My objective is to create something similar to Flip 3D; it would be great if someone also knew something about how to create a live preview.
For the glass effect areas: I think it doesn't work because those areas may be drawn with some strange DirectX method instead of normal GDI.
For the minimized windows problem: if a window is minimized, its DC isn't painted (conceptually, it doesn't even have a reason to exist); you should try to send to such windows a WM_PRINT message, asking them to paint themselves on the DC you'll provide them. The problem with this approach is that not all the windows handle correctly WM_PRINT.
I've found the API that is used for the taskbar previews a.s.o.:
DWM Thumbnail Overview
Pretty awesome, it even allows you to do live previews!

Resources