Steve Guest
|
Posted: Mon Jan 22, 2007 10:13 pm Post subject: TMediaplayer - 'no mci device open' or 'can not determine th |
|
|
I have been spending time in trying to get some code that works in Delphi 5
to work in Delphi 2005 (both installed on same computer), in relation to
TMediaPlayer.
An avi file (Flash file) plays well in delphi 5 using the following simple
code:
VideoPanel := TVideoPanel.Create1(Self, MediaPlayer1);
splash := SL5.ApplictnPath +
frmStart1.dfsVersionInfoResource1.OriginalFilename;
MediaPlayer1.FileName := splash;
VideoPanel.Open;
When this code is run in Delphi 2005, I either get "no mci device open" or
"can not determine the devicetype from the given extension" dependant on
various code changes that I make such as using
MediaPlayer1.Close, MediaPlayer1.DeviceType, MediaPlayer1.autorewind,
MediaPlayer1.AutoOpen, MediaPLayer1.Autoenable, MediaPlayer1.Visible,
MediaPlayer1.Display,
MediaPlayer1.AutoOpen, MediaPlayer1.Open, MediaPlayer1.displayrect,
MediaPlayer1.Play
I have tried other video files, which give the same error messages.
I have tried to ensure that certain .ocx files have been imported and that
the unit calls mmsystem under recommendation of certain smalll bits of
information that I have found on Tmediaplayer.
I look forward to good advice
Steve Wilcox |
|