any .NET developers here?

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Posts: 292
Joined: Wed Feb 01, 2006 7:29 am
Location: Germany

Post by holterpolter »

Do you know how to convert the Delphi example in to test it in Visual Basic Express 2005?
How do I create the SongsDB.SDBApplication object?
Posts: 3452
Joined: Sat Nov 05, 2005 7:17 pm

Post by Steegy »


First take a look in the wiki.
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Posts: 36
Joined: Fri Dec 15, 2006 6:29 am

Post by G.I. »

I program a lot in .Net, but I have only experience in (little bit of) windows / (plenty of) web applications that are on it's own. Not plugins or any other application that uses winapi or other windows applications... so I am not sure if I am much help. But if you want some, just let me know :)
Mike H
Posts: 39
Joined: Mon Mar 06, 2006 7:51 pm
Location: York, UK

.NET and Events

Post by Mike H »

I wrote my podcast plugin using .NET, the only way I could get events to work was using a vbscript to hook the events into the .NET object. This works pretty well (even if it is unpleasantly hacky), you just have to make sure the .net assemblies are compiled with COM interfaces too.

This is the autorun script from mmPodcasts - the events handlers are set from within the .NET code: OnChangedSelection must not have a script property, so it has to be hooked from here:

Code: Select all

' Blurb

Option Explicit

Sub onStartUp
    dim podcasts, podcastOptions
	set podcasts = CreateObject("mmPodcasts.PodcastsPlugin")
	set SDB.objects("PodcastsPlugin") = podcasts
	podcasts.init SDB, Script
	' Register event handlers
	Script.RegisterEvent SDB, "OnChangedSelection", "handleChangedSelection"
End Sub

' Retrieves the PodcastsPlugin object
Function podcasts()
    set podcasts = SDB.objects("PodcastsPlugin")
End Function

' Event Handlers
Sub handleUpdateDirectory(control)
End Sub

Sub handleDownloadPodcasts(control)
End Sub

Sub handleFillTracks(node)
End Sub

Sub handleChangedSelection
End Sub

Sub handleImport
End Sub

Sub handleExport
    Msgbox "Handle Export"
End Sub

Post Reply