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

mythichelm

  • Newbie
  • *
  • Posts: 7
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
  • Hero Member
  • *****
  • Posts: 25286
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: 7
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));