Tue, September 26, 2006, 12:00 AM under
Windows |
Vista
Vista has a great mobility story for both the end user and the developer. By "mobility" here I mean the
mobile PC (i.e. laptop/notebook, tabletpc, umpc). If you followed my Vista links, you’ll have come across the top 10 developer calls to action and number 10 on the list is:
build for mobility.
One of the features I call out at my developer sessions is being
power aware. Nobody likes a mobile PC that overheats and more importantly one that quickly runs out of battery; so you don't want your application to be the culprit that users point the finger at. When the user changes to a "power saver" plan, your app should respect it. When the user has pulled the cable and is running on battery, respect it! “Respect” means acting accordingly and consuming fewer resources avoiding unnecessary cpu intensive activities and thus saving battery life. Doing that, will allow your users to use your app for longer :)
To read more about being power aware, please visit the following 3 links:
- There is an
msdn page here.
- There is also a nice article by Neil Roodyn
here.
- You can follow links from the msdn page to a great Visual Studio solution that demonstrates what you have to do (
direct link to exe here).
Once you download the lab (from my 3rd link above), browse to "\VISTA_POWER_CS\Lab 4 completed" and open "Vista Power Management" project. When you run it, it looks like
this. Check it out, it is good :-)
I usually demo a very tiny subset of what is shown there. So if you've been to one of my talks and want my inferior demo, you may
download the zip here. Run it on Vista, change your
power plan and watch how the application responds. Do the same by pulling your power cable (
note: do not pull your power cable if you are on a PC instead of a mobile PC! :-))