However you might want to provide your users with a choice of skins, and this is very easy to do, in the following example we have a simple application that provides two skins at runtime. Both skins are embedded into the application and are loaded when the user clicks the appropriate button, you will need to carry the following tasks :-

using System; using System.Reflection; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } //<-------------------------------------------------------------------> /// <summary> /// Handles the LoadVistaAeroSkin button click event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLoadVistaAeroSkin_Click(object sender, EventArgs e) { // Get the resource path for the Aero skin string skinName = @"WindowsApplication1.Skins.Vista (Aero).vssf"; // Load the skin directly from the resource stream visualStyler1.LoadVisualStyle(Assembly.GetExecutingAssembly().GetManifestResourceStream(skinName)); } //<-------------------------------------------------------------------> /// <summary> /// Handles the LoadAquaSkin button click event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLoadAquaSkin_Click(object sender, EventArgs e) { // Get the resource path for the Aqua skin string skinName = @"WindowsApplication1.Skins.OSX (Aqua).vssf"; // Load the skin directly from the resource stream visualStyler1.LoadVisualStyle(Assembly.GetExecutingAssembly().GetManifestResourceStream(skinName)); } } }
Imports System Imports System.Reflection Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Text Imports System.Windows.Forms Namespace WindowsApplication1 Partial Public Class Form1 Inherits Form Public Sub New() InitializeComponent() End Sub '<-------------------------------------------------------------------> ''' <summary> ''' Handles the LoadVistaAeroSkin button click event ''' </summary> ''' <param name="sender"></param> ''' <param name="e"></param> Private Sub btnLoadVistaAeroSkin_Click(ByVal sender As Object, ByVal e As EventArgs) ' Get the resource path for the Aero skin Dim skinName As String = "WindowsApplication1.Vista (Aero).vssf" ' Load the skin directly from the resource stream visualStyler1.LoadVisualStyle(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(skinName)) End Sub '<-------------------------------------------------------------------> ''' <summary> ''' Handles the LoadAquaSkin button click event ''' </summary> ''' <param name="sender"></param> ''' <param name="e"></param> Private Sub btnLoadAquaSkin_Click(ByVal sender As Object, ByVal e As EventArgs) ' Get the resource path for the Aqua skin Dim skinName As String = "WindowsApplication1.OSX (Aqua).vssf" ' Load the skin directly from the resource stream visualStyler1.LoadVisualStyle(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(skinName)) End Sub End Class End Namespace