De volgende code activeert de Visual styles na het klikken op een button. Ik denk dat het in jou situatie ook zou moeten kunnen werken:
using System;
using System.Windows.Forms;
public class ConsoleDrv: Form
{
public ConsoleDrv()
{
Button b = new Button();
b.Text = "Test";
b.Top = 4;
b.Left = 4;
b.Parent = this;
b.Click += DoButtonClick;
CheckBox cb = new CheckBox();
cb.Text = "Checkbox";
cb.Top = 30;
cb.Left = 4;
cb.Parent = this;
}
private void DoButtonClick(object sender, EventArgs e)
{
Application.EnableVisualStyles();
Invalidate(true);
}
static void Main()
{
Application.Run(new ConsoleDrv());
}
}