如果有完整源码有望再加分100,望高手指点.......

解决方案 »

  1.   

    我有一个源码,但是现在好象找不到了!
    http://community.csdn.net/Expert/topic/3922/3922432.xml?temp=.6383325
      

  2.   

    从上帖找到这个API:
    SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "c:\temp\shit.bmp",0);
    SystemParametersInfo(20,1,systempath,0x1|0x2);  
    但不清楚用法,请指教!
      

  3.   

    声明改API,再调用
    using System.Runtime.InteropServices[DllImport("user32.dll", EntryPoint="SystemParametersInfoA")]
    static extern int32 SystemParametersInfo (int32 uAction, int32 uParam, any lpvParam, int32 fuWinIni);
    private const int SPI_SETDESKWALLPAPER = 20;SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "c:\\temp\\a.bmp",0);
      

  4.   

    any这个应该是string吧?
    难道更换的壁纸只能是bmp格式的,其它格式的怎么能,如:gif、jpg等等?
    还有壁纸的平铺、拉伸等属性怎么调?
      

  5.   

    应该是调用windows的Dll文件学习中~~~~~
      

  6.   

    这个问题的墙纸部分依赖于IActiveDesktop接口和屏保依赖于SystemParametersInfo;
    该帖未解决问题就不另开帖给分,抱歉!