Thema: Delphi Hat's einen Akku?

Einzelnen Beitrag anzeigen

OLDIE1950

Registriert seit: 2. Jan 2018
22 Beiträge
 
#5

AW: Hat's einen Akku?

  Alt 10. Sep 2018, 22:38
Code:
// WinApi command to get the status of the battery.
  if GetSystemPowerStatus(pSysPowerStatus) then
  begin
    // get the line status
    case pSysPowerStatus.ACLineStatus of
      0   : s:='Offline';
      1   : s:='Online';
      255 : s:='Unknown status.';
    end;
    label1.caption:='AC power status: '+s;
  Mit Zitat antworten Zitat