VB.Net - Monitor the status of your laptop battery

December 2016




The code demonstrates the use of:
  • A class module
  • The GetSystemPowerStatus API modified in VB.net to eliminate the "Access Violation Exception" error.
  • Using System.Windows.Forms.Timer ()
  • System.Windows.Forms.Timer()
  • Transfer of a class/form structure
  • WithEvents/Event/RaiseEvent



Note: all PC ill return the all information.

Related :

This document entitled « VB.Net - Monitor the status of your laptop battery » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.