That's a pretty simple trick, it just replaces the system color that's used for window backgrounds. You'd change it by P/Invoking the SetSysColor() API function. Here's a sample Windows Forms app that demonstrates the technique. Start a new WF app and drop a button on the form. Then paste this code:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsFormsApplication1 {
public partial class Form1 : Form {
int oldcolor;
public Form1() {
InitializeComponent();
oldcolor = GetSysColor(COLOR_WINDOW);
this.FormClosed += new FormClosedEventHandler(Form1_FormClosed);
this.button1.Click += new EventHandler(button1_Click);
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e) {
int element = COLOR_WINDOW;
SetSysColors(1, ref element, ref oldcolor);
}
private int Color2COLORREF(Color color) {
return color.R | (color.G << 8) | (color.B << 0x10);
}
private void button1_Click(object sender, EventArgs e) {
int element = COLOR_WINDOW;
int colorref = Color2COLORREF(Color.NavajoWhite);
SetSysColors(1, ref element, ref colorref);
}
private const int COLOR_WINDOW = 5;
[DllImport("user32.dll")]
private static extern bool SetSysColors(int one, ref int element, ref int color);
[DllImport("user32.dll")]
private static extern int GetSysColor(int element);
}
}