Autor Beitrag
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mo 22.05.06 17:37 
Ich will das auf Buttonklick der Windows Media Player Play,Reward,Forward,Pause und Stop "macht".
Ps: Forumsuche erfolglos!

Ich hab schon versucht das tutorial vom Winamp so zu verändern das es geht aber ich brings nicht!!! :bawling:


Moderiert von user profile iconraziel: Topic aus Dateizugriff verschoben am Di 23.05.2006 um 21:31

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 22.05.06 17:45 
Das Tutorial für Winamp kann da auch nicht funktionieren, weil Winamp eine ganz eigene Api mitbringt. Für den WMP könnte dieser Ansatz evtl. interessant sein.

_________________
We are, we were and will not be.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Mo 22.05.06 17:53 
vielen Dank!! muss ich dort noch was dazuprogrammieren oder läuft es schon???

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Mo 22.05.06 18:02 
Siehst du denn irgendwo ein fertiges Programm dort? Also was soll denn schon 'laufen'? :roll:

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Di 23.05.06 11:40 
ich meinte ob ichs 1zu1 übernehmen kann oder was dazu schreiben muss.
aber ich muss was dazuschreiben! das Windowhandle oder?? wie mach ich das???

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Di 23.05.06 11:49 
Naja, zumindest mal das Handle von deinem MediaPlayer (Ist da übrigens beschrieben). Habs jetzt aber nicht getestet ob es funktioniert ;)

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Di 23.05.06 11:54 
und wie mach ich das mim Handle??? ich hab null ahnung!!!!

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
elundril Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Di 23.05.06 21:26 
wie finde ich das handle für den Windows media player heraus??? bitte!!! ich brauch das!!!!! :bawling:

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
rjan
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 40

Win XP, WIN 2000, Win 98, Win 95, Win 3.11
D5 Stand /D7 enterp/2k5 pers.
BeitragVerfasst: So 13.08.06 21:51 
Titel: falls die suche nach dem mediaplayer steuerung diongs
Hi leute ich hab mich gerade durch den wmp-Kram gefressen ... um diesen so häufig gesuchten steuerungs Quelltext zu liefern schaut mal her:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
  const APPCOMMAND_MEDIA_NEXTTRACK     = $B0000;
  APPCOMMAND_MEDIA_PREVIOUSTRACK = $C0000;
  APPCOMMAND_MEDIA_STOP          = $D0000;
  APPCOMMAND_MEDIA_PLAY_PAUSE    = $E0000;

procedure TForm1.Button1Click(Sender: TObject);
var   wnd: HWND;
begin
  

  wnd :=  FindWindow('WMPlayerApp''Windows Media Player'); // Hier findet Delphi das Handle !!!!!!
  wnd :=  FindWindowEx(wnd, 0'WMPAppHost''WMPAppHost');

  if wnd <> 0 then
  begin
  Sendmessage(wnd, $003190, APPCOMMAND_MEDIA_PREVIOUSTRACK);
  end;
end;
AndiG
Hält's aus hier
Beiträge: 6


Delphi 7 Personal
BeitragVerfasst: Sa 19.08.06 11:00 
ich hätt dazu ma ne frage! un zwar gibt es ne möglichkeit auch die lautstärke des WMP dadurch zu steuern?#


Danke

MFG AndiG
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 19.08.06 12:03 
Klar gibts die. Dafür gibts die Konstanten
ausblenden Delphi-Quelltext
1:
2:
3:
APPCOMMAND_VOLUME_MUTE = $80000
APPCOMMAND_VOLUME_DOWN = $90000
APPCOMMAND_VOLUME_UP   = $a0000;

_________________
We are, we were and will not be.
AndiG
Hält's aus hier
Beiträge: 6


Delphi 7 Personal
BeitragVerfasst: Sa 19.08.06 15:03 
ahhh dankedankedanke!!! danach bin ich schon ne woche auf der suche!

vielen dank!

MFG Andi
rjan
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 40

Win XP, WIN 2000, Win 98, Win 95, Win 3.11
D5 Stand /D7 enterp/2k5 pers.
BeitragVerfasst: Sa 19.08.06 17:31 
Folge : der Quelltext sieht jetzt so aus ::::
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:
 const 
  APPCOMMAND_VOLUME_MUTE         = $80000
  APPCOMMAND_VOLUME_DOWN         = $90000
  APPCOMMAND_VOLUME_UP           = $a0000;
  APPCOMMAND_MEDIA_NEXTTRACK     = $B0000;
  APPCOMMAND_MEDIA_PREVIOUSTRACK = $C0000;
  APPCOMMAND_MEDIA_STOP          = $D0000;
  APPCOMMAND_MEDIA_PLAY_PAUSE    = $E0000;

procedure TForm1.Button1Click(Sender: TObject);
var   wnd: HWND;
begin
  

  wnd :=  FindWindow('WMPlayerApp''Windows Media Player'); // Hier findet Delphi das Handle !!!!!!
  wnd :=  FindWindowEx(wnd, 0'WMPAppHost''WMPAppHost');

  if wnd <> 0 then
  begin
  Sendmessage(wnd, $003190, APPCOMMAND_MEDIA_PREVIOUSTRACK);
  end;
end;


Wenn jetzt jemand noch ne Idee hat wie man den Titel .... des aktuell gespielten Tracks heraus bekommt wäre ich sehr dankbar den Quelltext zu bekommen...

Danke
NetSpider
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 123

Windows XP Pro
Delphi 7 Enterprise
BeitragVerfasst: Do 01.03.07 08:32 
Hat auch jemand ne Ahnung, wie man dem Player sagen kann, dass er in den Vollbild-Modus wechseln soll?

Danke - NetSpider

_________________
Wer in die Fußstapfen anderer tritt hinterlässt keine eigenen Spuren!
bnessler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 36

alle Win's , suse u. Ubuntu Linux
Delphi1,2,4,5,7,2005, Java (Eclipse), C++,C#, (VS2005)
BeitragVerfasst: Do 01.03.07 10:28 
Hallo,
man kann den Mediaplayer auch direkt einbinden und steuern. Man kommt dann zu den Titeln einer CD etwa wie folgt:

ausblenden volle Höhe 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:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
....
 WindowsMediaPlayer1: TWindowsMediaPlayer;
....

function TfrmMain.cddvd(cddvd: Integer): Boolean;
var
  LThePlayList: IWMPPlaylist;
  Genre: string;
  md: IWMPMedia;
  loop :Integer;
begin
    LThePlayList := WindowsMediaPlayer1.cdromCollection.Item(0).Playlist;
    genre := LThePlayList.getItemInfo('WM/Genre');
    Windowsmediaplayer1.currentPlaylist := LThePlaylist;
    md := WindowsMediaPlayer1.currentMedia;

     Contentid := md.getItemInfo('WM/WMContentID'); 
    LabelAlbumTitel.Caption := LThePlayList.name + ' / ' + LThePlayList.getItemInfo('Artist') + ' / Genre: ' + genre;

    for Loop := 0 to LThePlayList.Count - 1 do
    begin
      titelgrid.RowCount := Loop + 1;
      titelgrid.Cells[0, Loop] := IntToStr(Loop + 1);
      titelgrid.Cells[1, Loop] := LThePlayList.Item[Loop].name;
      titelgrid.Cells[2, Loop] := LThePlayList.Item[Loop].getItemInfo('Artist');
      titelgrid.Cells[3, Loop] := LThePlayList.Item[Loop].durationString;
      titelgrid.Cells[4, Loop] := LThePlayList.Item[Loop].sourceURL;
      //    ShowMessage(LThePlayList.Item[Loop].sourceURL); //Laufwerk
      //    ShowMessage(LThePlayList.Item[Loop].durationString); //Laufzeit
      //    ShowMessage(LThePlayList.Item[Loop].name); //Titel
      //    ShowMessage(LThePlayList.Item[Loop].getItemInfo('Artist'));

    end;
end;

hab ich aus meinem Code rauskopiert, das wesentliche sollte drin sein.
Gruß
Bernhard