this is a new MusicBee.exe that supports the in-built panel for entering config settings. It will be in the next weekly update as well
http://www.mediafire.com/?a7ymkpdn944vtcsOne thing to be aware, the Configure command can be called more than once during a MB session. When (if) that happens, a handle to a new empty panel is passed so the panel needs to be populated from scratch
C#:
using System.Drawing;
using System.Windows.Forms;
public bool Configure(IntPtr panelHandle)
{
// save any persistent settings in a sub-folder of this path
string dataPath = mbApiInterface.Setting_GetPersistentStoragePath();
// panelHandle will only be set if you set about.ConfigurationPanelHeight to a non-zero value
// keep in mind the panel width is scaled according to the font the user has selected
if (panelHandle != IntPtr.Zero) {
Panel configPanel = (Panel)Panel.FromHandle(panelHandle);
Label prompt = new Label();
prompt.AutoSize = true;
prompt.Location = new Point(0, 0);
prompt.Text = "prompt:";
TextBox textBox = new TextBox();
textBox.Bounds = new Rectangle(60, 0, 100, textBox.Height);
textBox.TextChanged += textBox_TextChanged;
configPanel.Controls.AddRange(new Control[] {prompt,textBox });
}
return true;
}
private void textBox_TextChanged(object sender, EventArgs e)
{
// save the value
}
VB:
Imports System.Drawing
Imports System.Windows.Forms
Public Function Configure(ByVal panelHandle As IntPtr) As Boolean
' panelHandle will only be set if you set about.ConfigurationPanelHeight to a non-zero value
' keep in mind the panel width is scaled according to the font the user has selected
If panelHandle <> IntPtr.Zero Then
Dim configPanel As Panel = Panel.FromHandle(panelHandle)
Dim prompt As New Label
prompt.AutoSize = True
prompt.Location = New Point(0, 0)
prompt.Text = "prompt:"
Dim textBox As New TextBox
textBox.Bounds = New Rectangle(60, 0, 100, textBox.Height)
AddHandler textBox.TextChanged, AddressOf textBox_TextChanged
configPanel.Controls.AddRange(New Control() {prompt, textBox})
End If
Return True
End Function
Private Sub textBox_TextChanged(ByVal sender As Object, ByVal e As EventArgs)
' save the value
End Sub