ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

vba¼v­µ¼·©ñ

vba¼v­µ¼·©ñ

ª©¤j ¥i¥H½Ð±Ð¤@¤U¶Ü??G¤j

§Ú³o¬Ovba¼·©ñªºcode,¬°¦ó¦bwin10 office2016¤UµLªk°õ¦æ,¨ä¥L³£¥i¥H°õ¦æ, ¬Ovbaª©¥»°ÝÃD¶Ü??ÁÙ¬O¨t²Î°ÝÃD




Private Sub CommandButton2_Click()
    Dim strNAME, strPATHNAME As String
    strPATHNAME = Sheets(2).Cells(1, 3)
    strNAME = Label2.Caption & ".mp4"
    With WindowsMediaPlayer2
        .Visible = True
        .URL = strPATHNAME & strNAME
        .stretchToFit = True
        
    End With
   
     WindowsMediaPlayer2.Width = 285
     WindowsMediaPlayer2.Height = 258
     WindowsMediaPlayer2.Controls.Play
     Find = 0
     totalTime = 0
     hTimer = SetTimer(0, 0, 1000, AddressOf TimerProc)
        
        
End Sub
yvonne

G¤j µ{¦¡½X§Ú¤w¸g¶K¤W¤F,¦]¬°ÁÙ¦³µ²¦X¼v¤ùÀÉ,,,§Ú¤£ª¾¹D¬O¤£¬OVBAª©¥»°ÝÃD
yvonne

TOP

class ¤£¯à¦Y AddressOf
­n©ñ module

TOP

class ¤£¯à¦Y AddressOf
­n©ñ module
jackyq µoªí©ó 2017-11-4 14:46


§Aªº modile ¸Ì­±¥²¶·¦³¤@­Ó Public  Function TimerProc

Public Function TimerProc(ByVal hwnd As Long, ByVal tMsg As Long, ByVal TimerID As Long, ByVal tickCount As Long) As Long
....................
End Function

TOP

§Úªºmodile ¦³©ñªü~~°õ¦æ¼·©ñ®É´N¬O·|Åã¥Ü«¬ºA¤£²Å¦X!!!!

Sub TimerProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal idEvent As Long, ByVal dwTime As Long) ode­È¨Ó±Ò°Ê¼v¤ù®æ¦¡
   
   
    UserForm1.Label2.Caption = UserForm1.WindowsMediaPlayer1.Controls.currentPosition
   
    If UserForm1.Label2.Caption > 1 And find = 0 Then
   
        For i = 0 To UserForm1.WindowsMediaPlayer1.currentPlaylist.Count - 1
            totalTime = totalTime + UserForm1.WindowsMediaPlayer1.currentPlaylist.Item(i).Duration
            Next
        
            tmpSecond = totalTime Mod 60
            tmpMinute = Int(totalTime / 60) Mod 60
            tmpHour = Int(Int(totalTime / 60) / 60)
            UserForm1.Label4.Caption = tmpHour & ":" & tmpMinute & ":" & tmpSecond
            UserForm1.CommandButton7.Left = 42 + (480 / totalTime) * UserForm1.Label2.Caption
        find = 1
    End If
    If find = 1 Then
        
        UserForm1.CommandButton7.Left = 42 + (480 / totalTime) * UserForm1.Label2.Caption '
            
    End If

End Sub
yvonne

TOP

[attachimg]27
yvonne

TOP

G¤j ½Ð±Ð¤@¤U­ì¥»ªºCode§Ú¬O¦boffice2013 win10©³¤U¼gªº¬O¥i¥H°õ¦æ,¦ý¬O¦boffice2016µLªk°õ¦æ½s¿è«¬ºA¤£²Å,µ²ªG§Ú¦boffice2016±q¥´¤FcodeÁÙ¬OµLªk°õ¦æ....><" ±zªº·N«ä­n¦b2003ª©¥»¼g
yvonne

TOP

        ÀR«ä¦Û¦b : ¦³¤ß´N¦³ºÖ¡A¦³Ä@´N¦³¤O¡A¦Û³yºÖ¥Ð¡A¦Û±oºÖ½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD