Autor Beitrag
DelphiDelphin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Fr 06.05.05 09:47 
Hi wen ich in der Tmediaplayer komponente nen Videowidergebe öffnet sich ein popup mit welcher kopponente kann ich machen da dies an einem bestimmten ort in meinem Proggi abgespielt wird.
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 06.05.05 10:06 
Da öffnet sich kein Popup (bei mir zumindest).

Setz mal ein Panel auf deine Form. Mit der Eigenschaft Display des TMediaplayers kannst du jetzt festlegen, dass das Video auf diesem Panel angezeigt wird (Display halt).
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Fr 06.05.05 11:22 
Hi ich hab jetzt ein Panel gemacht aber den Rest müstest du mir vileicht noch etwas genauer erklären
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Fr 06.05.05 11:32 
Hi ok habs schon kapiert kann ich auch noch machen das dass bild an das Panel angepasst wird also mit stretch ??
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 06.05.05 12:13 
Nein!!!!!! nicht mit stretch aber es gibt noch eine möglichkeit weisst du mit augen aufmachen und so aber egal weisst du musst mal nachschauen nach Align in dem Ding und so !!!!!


Moderiert von user profile iconKarlson: Mehr Ausrufezeichen eingefügt
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Fr 06.05.05 12:31 
Hi sory was soll ich mit align und so machen :cry:
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 06.05.05 12:36 
Align bedeutet soviel wie Ausrichtung/Ausdehnung. Folglich ist das Align des Displays dessen Ausrichtung. Warum suchst du nicht einfach mal die Eigenschaft und probierst ein bisschen aus? Ich habe echt keine Lust dir jedes Fitzelchen mit 50-Seiten Tutorial zu erklären, nur weil zu faul oder sonst was bist um dein Hirn einzuschalten :evil:
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Fr 06.05.05 12:46 
Hi sory ich raffs nicht.

1. Bei der Mediaplayer Componente kann ich kein align einstellen
2. Und beim pannel bringts nichts :cry:
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Fr 06.05.05 12:57 
Mal ganz kurze Zwischenfrage: Was willst du überhaupt :lol: Hab mir grad das ganze nochmal durchgelesen und ich glaube wir reden aneinander vorbei: Willst du das dass Display(panel) die ganze Form "überdeckt?" oder willst du das dass Bild des Mediplayers gestretcht wird, wie z.B. bei einem Image?
DelphiDelphin Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 181



BeitragVerfasst: Fr 06.05.05 13:03 
jo ich will das es ge stretcht wird wie bei ner image :wink:
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Fr 06.05.05 13:26 
Gleich haut mich bestimmt jemand, weil ich den 1-Zeilen Befehl nicht kenne, sondern mir was kompliziertes selbergebastelt habe :lol:
Ich hatte das Problem nämlich vor kurzem auch...
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
// MoviePanel: Darauf soll der Film ablaufen
// MainPanel: Das Panel, auf dem das MoviePanel liegt. Gibt die gewünschte Ausdehnung des Films an

// Das kommt direkt nach Mediaplayer1.open etc.
//1. Display setzen
MediaPlayer1.Display := MoviePanel;
//2. Moviepanel auf Default-Film-Größe setzen
MoviePanel.BoundsRect := MediaPlayer1.DisplayRect;
//3. MoviePanel soweit wie möglcih stretchen
StretchPanel(MoviePanel, MainPanel);
//4. Display-Rechteck neu setzen
MediaPlayer1.DisplayRect := MoviePanel.ClientRect;
wobei
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
procedure StretchPanel(var Source:TPanel; var Bounds:TPanel);
var xfactor, yfactor:double;
begin
  try
    xfactor:= Bounds.Width / Source.Width;
    yfactor:= Bounds.Height / Source.Height;
    // so weit wie möglich strecken
    if xfactor > yfactor then
    begin
      Source.Width:=round(Source.Width*yfactor);
      Source.Height:=round(Source.Height*yfactor);
      //zentrieren
      source.Top:=0;
      source.Left:=(Bounds.Width - Source.Width) Div 2;
    end else
    begin
      Source.Width:=round(Source.Width*xfactor);
      Source.Height:=round(Source.Height*xfactor);
      source.Left:=0;
      source.Top:=(Bounds.Height - Source.Height) Div 2;
    end;
  except
  end;
end;

_________________
We are, we were and will not be.