Well, it has been a little while since my last post. So to get back into things, I thought I would provide some insights into how to use COM interop to display a widget in the taskbar and specifically a graphical display of the battery power for a laptop. I should take a step back and explain, Lenovo has IMHO a great litle utility (see image below) which when I got my new VAIO for Christmas sadly does not come with.
![]()
Plus I downloaded Visual Studio 2008 from MSDN and needed a little project to play around with. So after a little google’ng I found two articles that explained pretty much what I needed and all I needed to do was put them together and presto, I too could have the utility on my new VAIO.
The first is how to use COM interop to extend Internet Explorer and Band Objects with C#
http://www.codeproject.com/KB/shell/dotnetbandobjects.aspx
and the second is regarding Power Awareness and Mobility with .NET
http://blogs.msdn.com/coding4fun/archive/2006/11/12/1066558.aspx
And with a little synergy later:Â
![]()
Since the transparency is a little off (well, isn’t transparent at all), I’m going to hold off posting the code until I can find the time to get it sorted.
Ideas for future development:
http://www.codeplex.com/vistabattery
Tags: c#, com interop
[...] a couple of days of developing (see previous post: