First off, why would you want to disable the Aero theme? Well, it turns out that it messes with vsync and can screw up the framerate of some applications. DirectX apps seem to be ok, but, in my experience at least, it really messes with OpenGL.
To disable it from within a .NET application you need to DllImport dwmapi.dll. To do this you need to reference System.Runtime.InteropServices:
using System.Runtime.InteropServices;
Within one of your classes - usually where you have the application entry point - you need the following:
[DllImport("dwmapi.dll", PreserveSig = true)]
public static extern int DwmEnableComposition(bool enable);
To invoke the method, simply do this:
DwmEnableComposition(false);