更改“活动桌面”是“显示WEB内容”时的桌面壁纸,出100分!(100分)

  • 主题发起人 主题发起人 laqo
  • 开始时间 开始时间
L

laqo

Unregistered / Unconfirmed
GUEST, unregistred user!
当桌面是“显示WEB内容”(me)或“按WEB页查看”(98)时,如何更改桌面壁纸呢?
 
直接更改就行了。<br>web页是可以调整大小的,用鼠标在边沿直接拖动就可以调整。
 
是说编程来实现。
 
这个问题也回答过得,我转贴一次:<br>获得墙纸 <br>procedure TForm1.Button1Click(Sender: TObject); <br>var <br>ADeskTop:IActiveDesktop; <br>wallpaper:PwideChar; <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:PwideChar; <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 &nbsp;<br>IActiveDesktop是什么?我运行的时候提示未知标识符。<br>&nbsp;<br>来自:liuly 时间:00-4-30 14:08:28 ID:234937 &nbsp;<br>uses <br>&nbsp; ComObj, &nbsp;// For CreateComObject<br>&nbsp; ShlObj; &nbsp;// For IActiveDesktop<br><br>来自:hahabb 时间:00-4-30 16:48:00 ID:235022 &nbsp;<br>CLSID_ActiveDesktop是什么?<br>&nbsp;<br>&nbsp;<br><br>--------------------------------------------------------------------------------<br>来自:hahabb 时间:00-5-5 7:57:21 ID:238318 &nbsp;<br>Who can help me?<br>&nbsp;<br>&nbsp;<br><br>--------------------------------------------------------------------------------<br>来自:hubdog 时间:00-5-5 8:09:09 ID:238330 &nbsp;<br>&nbsp; CLSID_ShellDesktop: TGUID = (<br>&nbsp; &nbsp; D1:$00021400; D2:$0000; D3:$0000; D4:($C0,$00,$00,$00,$00,$00,$00,$46));<br><br>就是com对象的全球唯一标识符Guid
 
那个wallpaper是PWIDECHAR,不知怎么一用中文不是乱码就是出错,怎么办?<br>我后来只好直接该注册表
 
哎呀,你用WideString,然后用PWideChar转换就行了。
 
我觉得你也可以试验用VBScript的方法,具体的方法,参见Happytime的源码,<br>里面就有一段相关的代码
 
接受答案了.
 

Similar threads

I
回复
0
查看
841
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部