{
Application.Run(new Form1());
}
[DllImport("kernel32.dll")]
public static extern bool WinExec(string CmdLine,int uCmdShow);
public const int SW_RESTORE=9;
private void button1_Click(object sender, System.EventArgs e)
{//启动控制面板
WinExec("rundll32.exe shell32.dll,Control_RunDLL",SW_RESTORE);
}
private void button2_Click(object sender, System.EventArgs e)
{//启动显示属性\桌面
WinExec("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0",SW_RESTORE);
}
private void button3_Click(object sender, System.EventArgs e)
{//启动显示属性\屏幕保护程序
WinExec("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,1",SW_RESTORE);
}
private void button4_Click(object sender, System.EventArgs e)
{//设置显示属性\设置
WinExec("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,3",SW_RESTORE);
}
}
}
