Einzelnen Beitrag anzeigen

Natcree

Registriert seit: 5. Mär 2013
502 Beiträge
 
Delphi 7 Enterprise
 
#25

AW: Compiliertes Programm läuft nicht auf XP

  Alt 6. Feb 2014, 12:47
So habe jetzt nur noch video zu laufen

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls,shellapi, MPlayer, StdCtrls;

type
  TForm1 = class(TForm)
    Panel1: TPanel;
    MediaPlayer1: TMediaPlayer;
    Timer1: TTimer;
    procedure FormCreate(Sender: TObject);
    procedure MediaPlayer1Notify(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses Unit2;

{$R *.dfm}
procedure Delay(Milliseconds: Integer);
var
  Tick: DWord;
  Event: THandle;
begin
  Event := CreateEvent(nil, False, False, nil);
  try
    Tick := GetTickCount + DWord(Milliseconds);
    while (Milliseconds > 0) and
          (MsgWaitForMultipleObjects(1, Event, False, Milliseconds, QS_ALLINPUT) <> WAIT_TIMEOUT) do
    begin
      Application.ProcessMessages;
      if Application.Terminated then Exit;
      Milliseconds := Tick - GetTickcount;
    end;
  finally
    CloseHandle(Event);
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
mediaplayer1.Play;
panel1.Align:=alclient;
borderstyle:=bsnone;
end;

procedure TForm1.MediaPlayer1Notify(Sender: TObject);
begin
  if mediaplayer1.NotifyValue = nvSuccessful then begin
    mediaplayer1.Play;
  end;
end;
so an dem code schnipsel muss irgendwas sein was xp nicht will
  Mit Zitat antworten Zitat