INTERACT FORUM
Windows => Plug-in Development => Topic started by: SBrandsborg aka Mouseman on April 20, 2004, 01:21:19 am
-
Can anyone come with a code example to how i get out of proc. to work in VB
i use MediaCenter91319.exe
-
http://yabb.jriver.com/interact/index.php?board=6;action=display;threadid=17409
Make sure you reference MC in your VB project.
-
i think i have remembered to reference to the tfl file in vb but not sure if its the right one
but is this code working?
Private Sub Form_Load()
Dim myMJ As MediaJukebox.MJAutomation
Set myMJ = GetObject(, "MediaJukebox Application")
If Err.Number = 429 Then
Set myMJ = CreateObject("MediaJukebox Application")
End If
Dim myFields As MediaJukebox.MJFieldsAutomation
Set myFields = myMJ.GetFields
Dim myField As MediaJukebox.MJFieldAutomation
For loop1 = 0 To myFields.GetNumberFields
Set myField = myFields.GetField(loop1)
MsgBox myField.GetName(True)
Next
End Sub
do i need more than that code to get it working?
-
That code works fine as is ... as long as MC is referenced in your VB project.
-
I have alot of troble dealing with out of proc is there a vb project example anyone can send me? that will be very big help
-
Didn't the above code work for you?
-
nope :s i have downloaded mc 10.0.111 and tryed the tfl (think it was the name) file from there
so do you have an example vb project example you can sent??
steffen@sbrandsborg.dk
-
I can't send you anything till I get home this evening as we only have VC++ here.
What error did you get?
The above code works and was used to hilight a MJFieldAutomation bug.
What MC module did you include in Project/References?
-
Im at work now to ;) can't remember the error right now but i will post it later :)
-
Dude,
I just emailed you the sample.
The only difference is that I added an "On Error Resume Next" before the first dim.
And the reference you should be adding is just "MediaJukebox".
-
There were problems with the typelibrary (tlb file) not registering properly in some versions though, weren't there? wasn't it around that version?