W wjiachun Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-29 #2 systemparametersinfo(SPI_SETDESKWallpaper,0,Nil,SPIF_SendChange);
W wjiachun Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-29 #4 那用 SystemParametersInfo(SPI_SETDESKWallpaper,0,'C:/a.bmp',SPIF_SendWinIniChange);
H hubdog Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-29 #5 获得墙纸 procedure TForm1.Button1Click(Sender: TObject); var ADeskTop:IActiveDesktop; wallpaperwideChar; begin ADeskTop:=CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop; GetMem(wallpaper,128); ADeskTop.GetWallpaper(wallpaper,128,0); ShowMessage(string(wallpaper)); FreeMem(wallpaper); end; 设置墙纸 procedure TForm1.Button1Click(Sender: TObject); var ADeskTop:IActiveDesktop; wallpaperwideChar; begin ADeskTop:=CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop; wallpaper:='d:/2.bmp'; ADeskTop.SetWallpaper(wallpaper,0); ADeskTop.ApplyChanges(AD_APPLY_ALL); end;
获得墙纸 procedure TForm1.Button1Click(Sender: TObject); var ADeskTop:IActiveDesktop; wallpaperwideChar; begin ADeskTop:=CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop; GetMem(wallpaper,128); ADeskTop.GetWallpaper(wallpaper,128,0); ShowMessage(string(wallpaper)); FreeMem(wallpaper); end; 设置墙纸 procedure TForm1.Button1Click(Sender: TObject); var ADeskTop:IActiveDesktop; wallpaperwideChar; begin ADeskTop:=CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop; wallpaper:='d:/2.bmp'; ADeskTop.SetWallpaper(wallpaper,0); ADeskTop.ApplyChanges(AD_APPLY_ALL); end;
H hahabb Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-30 #6 IActiveDesktop是什么?我运行的时候提示未知标识符。
L liuly Unregistered / Unconfirmed GUEST, unregistred user! 2000-04-30 #7 uses ComObj, // For CreateComObject ShlObj; // For IActiveDesktop
H hubdog Unregistered / Unconfirmed GUEST, unregistred user! 2000-05-05 #10 ;CLSID_ShellDesktop: TGUID = ( D1:$00021400; D2:$0000; D3:$0000; D4$C0,$00,$00,$00,$00,$00,$00,$46)); 就是com对象的全球唯一标识符Guid啊
;CLSID_ShellDesktop: TGUID = ( D1:$00021400; D2:$0000; D3:$0000; D4$C0,$00,$00,$00,$00,$00,$00,$46)); 就是com对象的全球唯一标识符Guid啊
H hubdog Unregistered / Unconfirmed GUEST, unregistred user! 2000-05-05 #11 或者简单点,不用com的话, 永久改变 SystemParametersInfo (SPI_SETDESKWALLPAPER, 0, 'Sample.bmp', SPIF_UPDATEINIFILE);
或者简单点,不用com的话, 永久改变 SystemParametersInfo (SPI_SETDESKWALLPAPER, 0, 'Sample.bmp', SPIF_UPDATEINIFILE);