Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi wie kann man Video automatisch schließen nach dem abspielen (https://www.delphipraxis.net/2570-wie-kann-man-video-automatisch-schliessen-nach-dem-abspielen.html)

dannforth 29. Jan 2003 21:50


wie kann man Video automatisch schließen nach dem abspielen
 
Hallo,
Ich habe eine procedure geschrieben, dass ein Video mit der mediaplayer komponente auf Vollbild geöffnet wird:
Delphi-Quellcode:
procedure TForm1.Video11Click(Sender: TObject);
begin
 Borderstyle := bsNone;
 Windowstate := wsMaximized;
 mediaplayer1.FileName:=opendialog1.FileName;
 mediaplayer1.Open;
 mediaplayer1.Play;
 mediaplayer1.DisplayRect:=form1.GetClientRect;
end;
Wie mache ich es jedoch, dass das Programm wieder aus dem Vollbildmodus zurückehrt, ohne, dass man erneut einen Befehl dur druck auf eine Taste geben muss.
zur Zeit habe ich es so gemacht, ich will aber das es automatisch geht:

Delphi-Quellcode:
procedure TForm1.schlieen1Click(Sender: TObject);
begin

 form1.ClientHeight := (360);
 Form1.ClientWidth := (457);
 Borderstyle := bsSizeable;
 Windowstate := wsNormal;
 mediaplayer1.Close;
end;
schon mal danke im Vorraus,
mfg,
Dannforth

[edit=Daniel B]Delphi-Tags gesetzt; MfG Daniel B.[/edit]

Luckie 29. Jan 2003 21:59

Löst der MediaPlayer ein Ereignis aus, wenndas Video zu ende ist?

Daniel B 29. Jan 2003 22:10

Zitat:

Zitat von Luckie
Löst der MediaPlayer ein Ereignis aus, wenndas Video zu ende ist?

Ich habe keins finden können.

Grüsse, Daniel :hi:

Daniel B 29. Jan 2003 22:15

Vielleicht bringt das noch was.

Zitat:

Occurs upon the completion of a media control method.

property OnNotify: TNotifyEvent;

Description

OnNotify occurs upon the completion of a media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, Resume, Rewind, StartRecording, Step, or Stop) when the Notify property is set to True before the call to the media control method. After an OnNotify event, the Notify property must be reset to True for the next OnNotify event to occur.
Sonst sieht es ziemlich schlecht aus.

Grüsse, Daniel :hi:

dannforth 30. Jan 2003 21:41

Hi,
mal schaun, ob ich da mit dem TNotifyEvent hinkrieg.
Auf jeden Fall danke für eure Antworten,
mfg,
dannforth

dannforth 31. Jan 2003 13:24

juhu,
ich habs geschaft,
Big thx @ Daniel für den tip mit notify.
mfg,
Dannforth

Luckie 31. Jan 2003 13:31

Und wo bleibe ich? Ich hatte ja die Idee mit dem Event. :mrgreen:

dannforth 31. Jan 2003 16:31

oh, sry,
Danke, lucky, Danke,

Luckie 31. Jan 2003 16:49

Nicht so schlimm, war ja nur ein Scherz. Aber trotzdem schreibt sich mein Nick mit ie.


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:53 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