F
fu_qi_ming
Unregistered / Unconfirmed
GUEST, unregistred user!
用以下代码换墙纸时:
With TRegistry.Create do
Try
RootKey:=HKEY_CURRENT_USER;
If OpenKey('Control Panel/Desktop',True) then
Begin
WriteString('Wallpaper',FWallpaper); //FWallpaper为图片路径
WriteString('TileWallpaper', '0');
WriteString('WallpaperStyle', '0');
end;
CloseKey;
Finally
Free;
End;
SystemParametersInfo(spi_SetDeskWallpaper, 0, PChar(FWallpaper), SPIF_SENDCHANGE);//FWallpaper为图片路径
在98,2000下都不能直接换墙纸,在win98下运行,要刷新才显示,在win2000下运行,
先要在屏幕属性里点"确定",然后出来刷新才能显示,为什么,请教??
//FWallpaper为图片路径(图片jpg格式,不在系统路径下)
With TRegistry.Create do
Try
RootKey:=HKEY_CURRENT_USER;
If OpenKey('Control Panel/Desktop',True) then
Begin
WriteString('Wallpaper',FWallpaper); //FWallpaper为图片路径
WriteString('TileWallpaper', '0');
WriteString('WallpaperStyle', '0');
end;
CloseKey;
Finally
Free;
End;
SystemParametersInfo(spi_SetDeskWallpaper, 0, PChar(FWallpaper), SPIF_SENDCHANGE);//FWallpaper为图片路径
在98,2000下都不能直接换墙纸,在win98下运行,要刷新才显示,在win2000下运行,
先要在屏幕属性里点"确定",然后出来刷新才能显示,为什么,请教??
//FWallpaper为图片路径(图片jpg格式,不在系统路径下)