C#修改电脑桌面图
兩個(gè)方法,引入之后直接調(diào)用即可。?
public class Win32Helper {[DllImport("user32.dll", EntryPoint = "SystemParametersInfoA")]internal static extern Int32 SystemParametersInfo(Int32 uAction, Int32 uParam, string lpvparam, Int32 fuwinIni); }存儲(chǔ)的方法?
void SetWallpaper(string imgPath) {int nResult;nResult = Win32Helper.SystemParametersInfo(20, 1, imgPath, 0x1 | 0x2); }驗(yàn)證過,可用。
與50位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖總結(jié)
- 上一篇: docker启动.NET3.1与5.0的
- 下一篇: ubuntu 命令行命令历史记录存储在哪