http://www.csdn.net/expert/topic/131/131369.shtm
http://www.csdn.net/expert/topic/112/112093.shtm
http://www.csdn.net/expert/topic/107/107259.shtm

解决方案 »

  1.   

    Reg:=TRegistry.Create;
    Reg.RootKey:= hkey_current_user;
    Reg.openkey('control panel\desktop',false);
    .............
    Reg.writestring('wallpaper',FileName);
    .............
    if ShowType='居中' then begin Reg.writestring('Tilewallpaper','0');
                         Reg.writestring('WallpaperStyle','0');end;
    if ShowType='平铺' then begin Reg.writestring('Tilewallpaper','1');
                         Reg.writestring('WallpaperStyle','0');end;
    if ShowType='拉伸' then begin reg.writestring('Tilewallpaper','0');
                         Reg.writestring('WallpaperStyle','2');end;
    SystemParametersInfo(SPI_SETDESKWALLPAPER,0,nil,SPIF_SENDWININICHANGE);
    Reg.closekey;
    Reg.Free;