撰寫程式來顯示桌面
撰寫程式來顯示桌面,可透過 Shell.Application 執行 ToggleDesktop 方法,其作用就是顯示桌面,可參考 MSDN 說明
http://msdn.microsoft.com/en-us/library/bb774124(VS.85).aspx
private void button1_Click(object sender, EventArgs e)
{
Type shellType = Type.GetTypeFromProgID("Shell.Application");
object shellObject = System.Activator.CreateInstance(shellType);
shellType.InvokeMember("ToggleDesktop", System.Reflection.BindingFlags.InvokeMethod, null, shellObject, null);
}