Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Library: Grafik / Sound / Multimedia (https://www.delphipraxis.net/21-library-grafik-sound-multimedia/)
-   -   Delphi Midi-Dateien abspielen (ohne MediaPlayer) (https://www.delphipraxis.net/2626-midi-dateien-abspielen-ohne-mediaplayer.html)

Daniel B 30. Jan 2003 23:22


Midi-Dateien abspielen (ohne MediaPlayer)
 
Delphi-Quellcode:
uses
  MMSystem;

type
  TForm1 = class(TForm)
  private
    procedure MMMCINotify(var Msg: TMessage); message MM_MCINOTIFY;
  // ...
  end;

procedure TForm1.Button1Click;
const
  FileName = 'C:\YourFile.mid';
begin
  MCISendString(PChar('play ' + FileName + ' notify alias sound'), nil, 0, Handle);
end;

procedure TForm1.MMMCINotify(var Msg: TMessage);
begin
  MCISendString('close sound', nil, 0, 0);
end;
Von d3g!

Grüsse, Daniel :hi:


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:51 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz