Thank you Frank and Larry and Beatie Boy. Got it going now
Mike
"Frank Adam" <fajp@xxxxoptushome.com.au> wrote in message
news:3eef886f.18258106@news-vip.optusnet.com.au...
> On Tue, 17 Jun 2003 21:28:52 GMT, fajp@xxxxoptushome.com.au (Frank
> Adam) wrote:
>
> Actually this might come in handy with that. :)
>
> Note : playmode is not used. I let the system work it all out.
>
> Public Function PlayFile(fileName As String, playMode As PLAYMODES) As
> Boolean
> Dim sRet As String
> Dim ret As Long, secs As Long, mins As Long, sec As Long
> sRet = Space$(200)
>
> isFilePlaying = False
>
> START_PLAY:
>
> ret = mciSendString("open " & Chr$(34) & Trim$(fileName) &
> Chr$(34) & " alias playing", sRet, Len(sRet), 0)
> If ret Then
> Select Case ret
> Case MCIERR_DUPLICATE_ALIAS:
> Call CloseMCI
> GoTo START_PLAY
> Case Else:
> MsgBox ret, vbOKOnly, "MCIError"
> End Select
> End If
> If ret = 0 Then
> ret = mciSendString("set playing time format ms", sRet, 200,
> 0)
> ret = mciSendString("status playing length", sRet, 200, 0)
> If ret = 0 Then
> secs = Val(Trim$(sRet)) \ 1000
> sec = secs Mod 60
> mins = secs \ 60
> frmPlayer.uscProgressBar1.Value = 0
> frmPlayer.uscProgressBar1.Max = secs
> curFileLength = "/" & Format$(mins, "00") & ":" &
> Format$(sec, "00")
>
> Else
> curFileLength = "/??:??"
> End If
> isMCIOpen = True
> isFilePlaying = MCIPlay
> End If
> PlayFile = isFilePlaying
> End Function
>
>
> >On Tue, 17 Jun 2003 22:17:54 +0100, "Mike Williams"
> ><Mike@BrandyandCoke.fsnet.co.uk> wrote:
> >
> >>"BeastFish" <BeastFish@for-president.com> wrote in message
> >>news:e200086.0306171312.4def7f05@posting.google.com...
> >>> you can use MCI. Take a look at this site:
> >>>
http://www.geocities.com/smigman.geo/mci/mci.html
> >>
> >>Are you sure that thing (MCI) can play mp3 files. I certainly can't make
it
> >>do so.
> >>
> >I can.
> >
> >excerpt :
> >
> >Public Function MCIPlay() As Long
> > Dim sRet As String * 200
> > Dim ret As Long
> > ret = mciSendString("play playing", sRet, 200, 0)
> > If ret = 0 Then
> > frmPlayer.tmrMCIUpdate.Enabled = True
> > End If
> >End Function
> >
> >--
> >
> >Regards, Frank
>
> --
>
> Regards, Frank