[DllImport("user32.dll", EntryPoint = "SystemParametersInfo")] public static extern int SystemParametersInfo( int uAction, int uParam, string lpvParam, int fuWinIni ); private void button1_Click(object sender, EventArgs e) { Image image = Image.FromFile("D:\\AAA.jpg"); image.Save("D:\\AAA.bmp",System.Drawing.Imaging.ImageFormat.Bmp); SystemParametersInfo(20, 0, "D:\\AAA.bmp", 0x2); }
原文:https://www.cnblogs.com/yinmu/p/12658054.html