Author Topic: How can I use current Music Bee Skin to theme new windows from plugins?  (Read 2602 times)

mythichelm

  • Newbie
  • *
  • Posts: 8
I'm working on a plugin that adds new windows, but the window is using the default skin for Windows Forms. How can I make the windows use the same style as the current Music Bee skin?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34313
by "add new windows" do you mean panels that show in the main application or do you mean a standalone window?

I assume its the later, so you can use:
Setting_GetSkinElementColor(0, ColorComponent.Background)

use Color.FromArgb() to convert the integer value to a color

mythichelm

  • Newbie
  • *
  • Posts: 8
I was asking about a standalone window. That was exactly what I was looking for, Thanks!

My code:
this.ForeColor = Color.FromArgb(api.Setting_GetSkinElementColour(
                MusicBeePlugin.Plugin.SkinElement.SkinInputPanel,
                MusicBeePlugin.Plugin.ElementState.ElementStateDefault,
                MusicBeePlugin.Plugin.ElementComponent.ComponentForeground));