Einzelnen Beitrag anzeigen

t.roller
(Gast)

n/a Beiträge
 
#2

AW: Interface 'IAudioEndpointVolume' läuft unter TurboDelphi aber nicht unter Delphi1

  Alt 24. Nov 2016, 18:40
Alternative:
Delphi-Quellcode:
const
  VK_VOLUME_MUTE = $AD;
  VK_VOLUME_DOWN = $AE;
  VK_VOLUME_UP = $AF;

procedure Press(Key: Byte);
begin
 keybd_event(Key, 0, 0, 0);
 keybd_event(Key, 0, KEYEVENTF_KEYUP, 0);
end;

procedure VolumeUP;
begin
  Press(VK_VOLUME_UP);
end;

procedure VolumeDOWN;
begin
  Press(VK_VOLUME_DOWN);
end;

procedure Mute;
begin
  Press(VK_VOLUME_MUTE);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Mute;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  VolumeUP;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  VolumeDOWN;
end;
  Mit Zitat antworten Zitat