-
May 26th, 2012, 09:02 PM
#1
need some help with this codae project
when I open project this error comes up msdxm.ocx and the other error im getting is (compile error method or data member not found)and then it highlight's .PlayState. I wont this to work because im making me one my self and what this open source project is for planet source code, its a replacement shell here is the cod that I have on .playState. :winkiss: I will like if anyone will fixs it out for me or can you show me how to do it, that will be fine. if you need nor source just ask me
http://http://www.planet-source-code...34182&lngWId=1
Code:
Dim SavePlaybackStatus As Boolean
Dim MediaPos2 As String
Dim MediaPos As String
Dim Media_PlayImageNum As Integer
Dim Media_LOADED As Boolean
Dim AutoMix_ON As Boolean
Dim AutoMix_PLAYERID As Integer
Dim AutoMix_MEDIAID As Integer
Public Sub UpdateMediaOptions()
If AutoMix_ON = False Then Exit Sub
With MediaBarOptions
.cmdClearList.Caption = "STOP && CLEAR Playlist"
For asd = 0 To lstPlayList.ListCount - 1
.lstPlayList.AddItem lstPlayList.List(asd)
.lstPlayListb.AddItem PROBas.GetFileTitle(lstPlayList.List(asd))
Next
End With
End Sub
Public Sub PlaySingle(ExFilenm As String)
'Stop all other media
If AutoMix_ON = True Then StopAndClearPlaylistMixer
d = PROBas.INIGetSetting("mediabar", "autoplay", PATHFile + "Users\" + CurrentUser + ".itc")
MPlayer(0).FileName = ExFilenm
AutoMix_PLAYERID = 0
If Not d = 1 Then MPlayer(0).Stop
Media_LOADED = True
Media_PlayImageNum = -1
playimg_timer.Enabled = True
End Sub
Public Sub StopAndClearPlaylistMixer()
StopMedia
lstPlayList.Clear
AutoMix_ON = False
AutoMix_MEDIAID = -1
AutoMix_PLAYERID = 0
End Sub
Public Sub StartNewPlaylistMixer()
'Starts a new playlist process
If AutoMix_ON = True Then AutoMix_ON = False
lstPlayList.Clear
AutoMix_MEDIAID = -1
AutoMix_PLAYERID = 0
For asd = 0 To MediaBarOptions.lstPlayList.ListCount - 1
lstPlayList.AddItem MediaBarOptions.lstPlayList.List(asd)
Next
MPlayer(0).Stop
MPlayer(1).Stop
Media_LOADED = True
playimg_timer.Enabled = True
AutoMix_ON = True
End Sub
Public Sub ShowNowPlayingWindow()
If Media_LOADED = False Then Media_NowPlaying.ShowNowPlaying "", Main.MediaBar.Left, Main.MediaBar.Top: Exit Sub
Media_NowPlaying.ShowNowPlaying PROBas.GetFileTitle(MPlayer(AutoMix_PLAYERID).FileName), Main.MediaBar.Left, Main.MediaBar.Top
End Sub
Public Sub StopMedia()
MPlayer(AutoMix_PLAYERID).Stop
MPlayer(AutoMix_PLAYERID).CurrentPosition = 0
PROBas.INISaveSetting "0", "mediabar", "dump_playing", PATHFile + "Users\" + CurrentUser + ".itc"
End Sub
Public Sub PauseMedia()
On Error GoTo 432
MPlayer(AutoMix_PLAYERID).Pause
432
Exit Sub
MsgBox "Media Bar cannot pause\playback this file. It may be of the wrong format or corrupt. If you downloaded this file, try downloading it again - or contact your media vendor.", 16, "Media Error"
End Sub
Public Sub ResumePlayMedia()
On Error GoTo 435
MPlayer(AutoMix_PLAYERID).Play
Exit Sub
435
MsgBox "Media Bar cannot playback this file. It may be of the wrong format or corrupt. If you downloaded this file, try downloading it again - or contact your media vendor.", 16, "Media Error"
End Sub
Private Sub Form_Load()
'Get Mix %
sf = PROBas.INIGetSetting("mediabar", "mixpercent", PATHFile + "Users\" + CurrentUser + ".itc")
If IsNumeric(sf) = False Then sf = 2.8
If sf < 1 Or sf > 50 Then sf = 2.8
txtMixPrcnt = sf
'Get ResumePlayback
gds = PROBas.INIGetSetting("mediabar", "resumeplayback", PATHFile + "Users\" + CurrentUser + ".itc")
If gds = 1 Then SavePlaybackStatus = True
'See if there was media playing when Nexus was last closed
If SavePlaybackStatus = False Then Exit Sub
eg = PROBas.INIGetSetting("mediabar", "dump_playing", PATHFile + "Users\" + CurrentUser + ".itc")
If Not eg = 1 Then Exit Sub
'There was music playing...
' see if it was a playlist or single media file
eg = PROBas.INIGetSetting("mediabar", "dump_medianum", PATHFile + "Users\" + CurrentUser + ".itc")
If eg = "" Then Exit Sub
If eg = 1 Then
'Single Media File
egfaa = PROBas.INIGetSetting("mediabar", "dump_media1", PATHFile + "Users\" + CurrentUser + ".itc")
GoTo startplayback
Else
'Playlist
' re-construct the playlist
Dim egfa As String
For fdg = 1 To eg
egfa = PROBas.INIGetSetting("mediabar", "dump_media" & fdg, PATHFile + "Users\" + CurrentUser + ".itc")
If FileCheck(egfa) = False Then MsgBox "The media that was playing in your last Nexus session could not be found. Playback cannot commence.", 16, "Auto-Resume": Exit Sub
lstPlayList.AddItem egfa
Next
sfee = 1
'Now set the vairbles...
startplayback:
exh = PROBas.INIGetSetting("mediabar", "dumpvar_AutoMix_PLAYERID", PATHFile + "Users\" + CurrentUser + ".itc")
If exh = "" Then exh = 0
exn = PROBas.INIGetSetting("mediabar", "dumpvar_AutoMix_MEDIAID", PATHFile + "Users\" + CurrentUser + ".itc")
ewn = PROBas.INIGetSetting("mediabar", "dumpvar_CurrentPosition", PATHFile + "Users\" + CurrentUser + ".itc")
If AutoMix_ON = True Then AutoMix_ON = False
AutoMix_MEDIAID = exn
AutoMix_PLAYERID = exh
If sfee = 1 Then MPlayer(AutoMix_PLAYERID).FileName = lstPlayList.List(AutoMix_MEDIAID) Else MPlayer(AutoMix_PLAYERID).FileName = egfaa
Media_LOADED = True
MPlayer(AutoMix_PLAYERID).CurrentPosition = ewn
If sfee = 1 Then AutoMix_ON = True
playimg_timer.Enabled = True
Main.Form_Resize
End If
Exit Sub
End Sub
Private Sub lstPlayList_Click()
If lstPlayList.ListCount = 0 Then Exit Sub
If lstPlayList = "" Then Exit Sub
MsgBox lstPlayList
End Sub
Private Sub MixTimer_Timer()
If AutoMix_ON = False Then GreenLabel = "AutoMix OFF": MediaPos2 = "{No Media}": MediaPos = "{No Media}": Exit Sub
If MPlayer(AutoMix_PLAYERID).CurrentPosition = -1 And MPlayer(AutoMix_PLAYERID).PlayState = mpPlaying Then
MediaPos2 = "{No Media}": MediaPos = "{No Media}": GreenLabel.Caption = "Media Error!": Exit Sub 'Warningpage.AddWarning "Media Playback Error": Exit Sub
Else
If AutoMix_MEDIAID > lstPlayList.ListCount Then GoTo finrec
If Not GreenLabel = "Playing (" & (AutoMix_MEDIAID + 1) & "\" & lstPlayList.ListCount & ")..." Then GreenLabel = "Playing (" & (AutoMix_MEDIAID + 1) & "\" & lstPlayList.ListCount & ")..."
If MPlayer(AutoMix_PLAYERID).CurrentPosition = 0 Then GreenLabel = "Stopped"
If MPlayer(AutoMix_PLAYERID).PlayState = mpPaused Then GreenLabel = "Paused"
If MPlayer(AutoMix_PLAYERID).PlayState = mpWaiting Then GreenLabel = "!WARNING!": Warningpage.AddWarning "Media Automation Error"
If MPlayer(AutoMix_PLAYERID).Duration > 100 Then
Main.MediaBar_Progress.Max = MPlayer(AutoMix_PLAYERID).Duration
End If
If AutoMix_PLAYERID = 0 Then
MediaPos = MPlayer(AutoMix_PLAYERID).CurrentPosition & "\" & MPlayer(AutoMix_PLAYERID).Duration
If Not MPlayer(AutoMix_PLAYERID).Duration > 100 Then
If Not MPlayer(AutoMix_PLAYERID).Duration < 1 Then
Main.MediaBar_Progress.Value = MPlayer(AutoMix_PLAYERID).CurrentPosition
End If
End If
MediaPos2 = "{No Media Playing}"
Else
If Not MPlayer(AutoMix_PLAYERID).Duration > 100 Then
If Not MPlayer(AutoMix_PLAYERID).Duration < 1 Then
Main.MediaBar_Progress.Value = MPlayer(AutoMix_PLAYERID).CurrentPosition
End If
End If
MediaPos2 = MPlayer(AutoMix_PLAYERID).CurrentPosition & "\" & MPlayer(AutoMix_PLAYERID).Duration
MediaPos = "{No Media Playing}"
End If
xx = (MPlayer(AutoMix_PLAYERID).Duration / 100) * txtMixPrcnt ' % before end
If MPlayer(AutoMix_PLAYERID).CurrentPosition >= MPlayer(AutoMix_PLAYERID).Duration - xx Or AutoMix_MEDIAID = -1 Then
'The end of the last song is nigh...
' Show mixin label
MixinNow.Visible = True
' Change PLAYERID
If AutoMix_PLAYERID = 0 Then
AutoMix_PLAYERID = 1
Else
AutoMix_PLAYERID = 0
End If
' Update MEDIAID
AutoMix_MEDIAID = AutoMix_MEDIAID + 1
' Start Playing Next Media File
On Error GoTo finrec
MPlayer(AutoMix_PLAYERID).FileName = lstPlayList.List(AutoMix_MEDIAID)
Else
MixinNow.Visible = False
End If
Exit Sub
finrec:
MsgBox "The Playlist Mixer Process has finished.", 64, "Media Bar Notification"
lstPlayList.Clear
AutoMix_MEDIAID = -1
AutoMix_PLAYERID = 0
AutoMix_ON = False
Media_LOADED = False
End If
End Sub
Private Sub playimg_timer_Timer()
If Media_LOADED = False Then
'Reset image counter var
Media_PlayImageNum = -1
'Load the dead play image
Main.MediaBar.Picture = playimg_dead.Picture
PROBas.INISaveSetting "0", "mediabar", "dump_playing", PATHFile + "Users\" + CurrentUser + ".itc"
Else
If Not MPlayer(AutoMix_PLAYERID).PlayState = mpStopped Then PROBas.INISaveSetting "1", "mediabar", "dump_playing", PATHFile + "Users\" + CurrentUser + ".itc" Else PROBas.INISaveSetting "0", "mediabar", "dump_playing", PATHFile + "Users\" + CurrentUser + ".itc"
'Save Auto-Resume Settings
If SavePlaybackStatus = True Then
'Number of media files
If AutoMix_ON = True Then
'Playlist
If lstPlayList.ListCount = 0 Then Media_LOADED = False: Exit Sub
PROBas.INISaveSetting lstPlayList.ListCount, "mediabar", "dump_medianum", PATHFile + "Users\" + CurrentUser + ".itc"
'Save Playlist
For affs = 1 To lstPlayList.ListCount
PROBas.INISaveSetting lstPlayList.List(affs - 1), "mediabar", "dump_media" & affs, PATHFile + "Users\" + CurrentUser + ".itc"
Next
Else
'Single Media
PROBas.INISaveSetting "1", "mediabar", "dump_medianum", PATHFile + "Users\" + CurrentUser + ".itc"
PROBas.INISaveSetting MPlayer(AutoMix_PLAYERID).FileName, "mediabar", "dump_media1", PATHFile + "Users\" + CurrentUser + ".itc"
End If
'Save Current Varibles
PROBas.INISaveSetting AutoMix_PLAYERID, "mediabar", "dumpvar_AutoMix_PLAYERID", PATHFile + "Users\" + CurrentUser + ".itc"
PROBas.INISaveSetting AutoMix_MEDIAID, "mediabar", "dumpvar_AutoMix_MEDIAID", PATHFile + "Users\" + CurrentUser + ".itc"
PROBas.INISaveSetting MPlayer(AutoMix_PLAYERID).CurrentPosition, "mediabar", "dumpvar_CurrentPosition", PATHFile + "Users\" + CurrentUser + ".itc"
End If
'----------------------------------
If MPlayer(AutoMix_PLAYERID).PlayState = mpStopped Then Main.MediaBar.Picture = playimg_dead.Picture: Media_PlayImageNum = -1: Main.MediaBar_Progress.Value = 0: Exit Sub
If Not MPlayer(AutoMix_PLAYERID).PlayState = mpPlaying Then Main.MediaBar.Picture = playimg(0).Picture: Media_PlayImageNum = -1: Exit Sub
If Media_PlayImageNum >= 2 Then Media_PlayImageNum = -1
'Update Progress Bar Control
Main.MediaBar_Progress.Max = MPlayer(AutoMix_PLAYERID).Duration
Main.MediaBar_Progress.Value = MPlayer(AutoMix_PLAYERID).CurrentPosition
'Update Plaing Images On Media Bar
Media_PlayImageNum = Media_PlayImageNum + 1
Main.MediaBar.Picture = playimg(Media_PlayImageNum).Picture
End If
End Sub
]
-
May 26th, 2012, 11:19 PM
#2
Re: need some help with this codae project
What is the error that comes up?
Is that OCX on your system?
Is it properly registered?
Always use [code][/code] tags when posting code.
-
May 27th, 2012, 08:33 AM
#3
Re: need some help with this codae project
Hi I got the OCX to work but when I run the program I get this message Compile error method or data member not found
Code:
'Now set the vairbles...
startplayback:
exh = PROBas.INIGetSetting("mediabar", "dumpvar_AutoMix_PLAYERID", PATHFile + "Users\" + CurrentUser + ".itc")
If exh = "" Then exh = 0
exn = PROBas.INIGetSetting("mediabar", "dumpvar_AutoMix_MEDIAID", PATHFile + "Users\" + CurrentUser + ".itc")
ewn = PROBas.INIGetSetting("mediabar", "dumpvar_CurrentPosition", PATHFile + "Users\" + CurrentUser + ".itc")
If AutoMix_ON = True Then AutoMix_ON = False
AutoMix_MEDIAID = exn
AutoMix_PLAYERID = exh
If sfee = 1 Then MPlayer(AutoMix_PLAYERID).FileName = lstPlayList.List(AutoMix_MEDIAID) Else MPlayer(AutoMix_PLAYERID).FileName = egfaa
Media_LOADED = True
MPlayer(AutoMix_PLAYERID).CurrentPosition = ewn
If sfee = 1 Then AutoMix_ON = True
playimg_timer.Enabled = True
Main.Form_Resize
End If
the one in orange is what I get when I run the program.
thanks
-
May 29th, 2012, 07:17 AM
#4
Re: need some help with this codae project
"method or data member not found" indicates that the object (here MPlayer(x)) has no property/element of the name FileName.
To see all properties of an object you go to a new line and type MPlayer(AutoMix_PLAYERID).
After having typed the dot, the intellisense list should open and show all available items.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|