« on: February 10, 2021, 06:25:18 PM »
Thanks for your support. Your suggestions got my plug-in working properly.
In summary, for Forum Readers, my goal was to create a window that displays the current playing track name.
This window will get merged with a Zoom channel using OBS to automatically display the current track on our Zoom channel.
In the Visual Basic Source Plug-in 3.1, I created Form1 and added a TextBox1
At the top of the TestVbDll.vb file I declared oForm
Dim oForm As Form1
In the Initialise Function I added code to create the form in the MusicBee GUI thread:
Dim MBptr As IntPtr
MBptr = mbApiInterface.MB_GetWindowHandle()
Dim f As Form = DirectCast(Form.FromHandle(MBptr), Form)
' this code runs in the GUI thread
oForm = New Form1()
and in the TrackChanged Notification I added code to write the current track to the text box
Dim tracktitle As String = mbApiInterface.NowPlaying_GetFileTag(MetaDataType.TrackTitle)
oForm.TextBox1.Text = tracktitle