There is some easily available information on finding the status of a battery, or weather it\'s charging or not. (GetSystemPowerStatus API or System.Windows.Forms.SystemInformat
I think it's possible, because it was patented by IBM (patent no. 7570015).
Not sure if there's a Windows API available for that.