The form with all functionality commented out:
Dim g_MJ As MediaJukebox.MJAutomation
Public Function Init(ByVal MediaJukebox As Object)
MsgBox "init start"
' set the global Media Jukebox object on init
' (Media Jukebox will call this function when the plugin starts)
Set g_MJ = MediaJukebox
MsgBox "init done"
Timer1.Enabled = True
End Function
Private Sub cmdInterval_Click()
Timer1.Interval = txtInterval.Text
End Sub
Private Sub Timer1_Timerxxxx()
MsgBox "click"
imgGo.Visible = True
imgStop.Visible = False
On Error Resume Next
Dim MJInfo As MediaJukebox.MJPlaybackAutomation
Set MJInfo = g_MJ.GetPlayback
Dim mjFile As MediaJukebox.MJFileAutomation
Dim mjPlaylist As MediaJukebox.MJCurPlaylistAutomation
Set mjPlaylist = g_MJ.GetCurPlaylist
CurrentlyPlaying = mjPlaylist.Position
Set mjFile = mjPlaylist.GetFile(CurrentlyPlaying)
Dim MJMixer As MediaJukebox.MJMixerAutomation
Set MJMixer = g_MJ.GetMJMixer
MJX.sName = mjFile.Name
MJX.sArtist = mjFile.Artist
MJX.sAlbum = mjFile.Album
MJX.lBitrate = mjFile.Bitrate
MJX.sFileName = mjFile.FileName
MJX.sGenre = mjFile.Genre
MJX.bContinuous = mjPlaylist.Continuous
MJX.bShuffle = mjPlaylist.Shuffle
MJX.iTrackNumber = mjFile.Tracknumber
MJX.lDuration = "12:32" 'mjFile.Duration
MJX.sFileType = mjFile.Filetype
MJX.lBitsPerSample = MJInfo.Bitspersample
MJX.iChannels = MJInfo.Channels
MJX.lPosition = "12:33" 'MJInfo.Position
MJX.lSampleRate = MJInfo.Samplerate
MJX.iState = MJInfo.State
MJX.iBalance = MJMixer.Balance
MJX.bEQOn = MJMixer.EQOn
MJX.iEQBand0 = MJMixer.GetEQBand(0)
MJX.iEQBand1 = MJMixer.GetEQBand(1)
MJX.iEQBand2 = MJMixer.GetEQBand(2)
MJX.iEQBand3 = MJMixer.GetEQBand(3)
MJX.iEQBand4 = MJMixer.GetEQBand(4)
MJX.iEQBand5 = MJMixer.GetEQBand(5)
MJX.iEQBand6 = MJMixer.GetEQBand(6)
MJX.iEQBand7 = MJMixer.GetEQBand(7)
MJX.iEQBand8 = MJMixer.GetEQBand(
MJX.iEQBand9 = MJMixer.GetEQBand(9)
MJX.iEQBand10 = MJMixer.GetEQBand(10)
MJX.bMute = MJMixer.Mute
MJX.iVolume = MJMixer.Volume
MJX.iPlaylistPosition = mjPlaylist.Position
MJX.iNumberOfFiles = mjPlaylist.GetNumberFiles
MJX.sCustom1 = mjFile.Custom1
MJX.sCustom2 = mjFile.Custom2
MJX.sCustom3 = mjFile.Custom3
If Err.Number <> 0 Then
MsgBox Err.Description
End If
SetSharedData
imgGo.Visible = False
imgStop.Visible = True
End Sub
Private Sub UserControl_Initialize()
MsgBox "init2 start"
Timer1.Interval = txtInterval.Text
MsgBox "init shared data start"
'InitSharedData
MsgBox "init2 & shared data done"
End Sub
Private Sub UserControl_Terminate()
CloseSharedData
End Sub