这个问题也回答过得,我转贴一次:<br>获得墙纸 <br>procedure TForm1.Button1Click(Sender: TObject); <br>var <br>ADeskTop:IActiveDesktop; <br>wallpaper
wideChar; <br>begin <br>ADeskTop:=CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop; <br>GetMem(wallpaper,128); <br>ADeskTop.GetWallpaper(wallpaper,128,0); <br>ShowMessage(string(wallpaper)); <br>FreeMem(wallpaper); <br>end; <br>设置墙纸 <br>procedure TForm1.Button1Click(Sender: TObject); <br>var <br>ADeskTop:IActiveDesktop; <br>wallpaper
wideChar; <br>begin <br>ADeskTop:=CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop; <br>wallpaper:='d:/2.bmp'; <br>ADeskTop.SetWallpaper(wallpaper,0); <br>ADeskTop.ApplyChanges(AD_APPLY_ALL); <br>end; <br><br>---------------------------------<br>来自:hahabb 时间:00-4-30 11:54:55 ID:234851 <br>IActiveDesktop是什么?我运行的时候提示未知标识符。<br> <br>来自:liuly 时间:00-4-30 14:08:28 ID:234937 <br>uses <br> ComObj, // For CreateComObject<br> ShlObj; // For IActiveDesktop<br><br>来自:hahabb 时间:00-4-30 16:48:00 ID:235022 <br>CLSID_ActiveDesktop是什么?<br> <br> <br><br>--------------------------------------------------------------------------------<br>来自:hahabb 时间:00-5-5 7:57:21 ID:238318 <br>Who can help me?<br> <br> <br><br>--------------------------------------------------------------------------------<br>来自:hubdog 时间:00-5-5 8:09:09 ID:238330 <br> CLSID_ShellDesktop: TGUID = (<br> D1:$00021400; D2:$0000; D3:$0000; D4
$C0,$00,$00,$00,$00,$00,$00,$46));<br><br>就是com对象的全球唯一标识符Guid