How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
Go Back  Xtreme Visual Basic Talk > > > How to get song lenght using winmm.dll in (vb.net 2010 express x64)


Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2011, 05:06 PM
jari_stockholm jari_stockholm is offline
Regular
 
Join Date: Nov 2002
Location: Stockholm/Sweden
Posts: 69
Question How to get song lenght using winmm.dll in (vb.net 2010 express x64)


I can play/stop/resume mp3 file using the vb.net code belov.

Question:
1. How do i get the song position in milliseconds
2. How do i get the song lenght in milliseconds

....
Code:
'Declarations
    Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, _
ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
....



    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Load MP3 file into mciSendString.
        mciSendString("OPEN d:\dd.mp3 TYPE MPEGVIDEO ALIAS makeoneup", String.Empty, 0, 0)
        'Play file.
        mciSendString("PLAY makeoneup", String.Empty, 0, 0)
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        'Stop file.
        mciSendString("STOP makeoneup", String.Empty, 0, 0)
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        'Play file from the beginning.
        mciSendString("PLAY makeoneup FROM 0", String.Empty, 0, 0)
    End Sub

Last edited by Flyguy; 06-29-2011 at 02:45 AM. Reason: Added [code][/code] tags
Reply With Quote
  #2  
Old 06-29-2011, 03:28 AM
DrPunk's Avatar
DrPunkHow to get song lenght using winmm.dll in (vb.net 2010 express x64) DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

It looks like "status" should do it for you -> http://msdn.microsoft.com/en-us/library/ms713277
__________________
There are no computers in heaven!
Reply With Quote
Reply

Tags
mcisendstring, mp3, vb.net, winmm.dll, x64


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64) How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
 
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
How to get song lenght using winmm.dll in (vb.net 2010 express x64)
 
-->