在活动桌面显示Web页 右健->属性->Web->在活动桌面显示Web页->新建->选择html->既可以设置桌面为Web页请问用程序怎么实现该功能,修改后要求及时刷新 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ...show/hide the ActiveDesktop? Autor: Thomas Stutz [Write new comment] [ Print tip ] Tip Rating (6): uses ComObj, ShlObj, ActiveX;procedure EnableActiveDesktop(bValue: Boolean);const CLSID_ActiveDesktop: TGUID = (D1: $75048700; D2: $EF1F; D3: $11D0; D4: ($98, $88, $00, $60, $97, $DE, $AC, $F9));var MyObject: IUnknown; ActiveDesk: IActiveDesktop; twpoComponentOpt: TComponentsOpt;begin MyObject := CreateComObject(CLSID_ActiveDesktop); ActiveDesk := MyObject as IActiveDesktop; with twpoComponentOpt do begin ZeroMemory(@twpoComponentOpt, SizeOf(TComponentsOpt)); dwSize := SizeOf(twpoComponentOpt); fEnableComponents := bValue; // fActiveDesktop := True; end; ActiveDesk.SetDesktopItemOptions(twpoComponentOpt, 0); ActiveDesk.ApplyChanges(AD_APPLY_ALL);end; 怎么实现阿假如我要把桌面设置成G:\123.htm,应该怎么实现假如我要把桌面设置成www.sohu.com,应该怎么实现 参考这里:http://www.nssoft.net/showdoc.asp?did=736 uses ShlObj, ComObj; procedure SetWallpaper(WallpaperPath: String);const CLSID_ActiveDesktop: TGUID = '{75048700-EF1F-11D0-9888-006097DEACF9}';var ActiveDesktop: IActiveDesktop; ComponentsOpt: TComponentsOpt; WStr : PWideChar;begin WStr := AllocMem(MAX_PATH); try StringToWideChar(WallpaperPath, WStr, MAX_PATH); ActiveDesktop := CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop; ComponentsOpt.dwSize := sizeOf(ComponentsOpt); ActiveDesktop.GetDesktopItemOptions(ComponentsOpt,0); ComponentsOpt.fActiveDesktop := true; //启动ActiveDesktop ActiveDesktop.SetDesktopItemOptions(ComponentsOpt,0); ActiveDesktop.SetWallpaper(WStr, 0); ActiveDesktop.ApplyChanges(AD_APPLY_ALL); //储存设定 finally FreeMem(wstr); end;end; 难道无人能解,Csdn真的没有高手,全是来混的玩的??????????????????? 倒。楼主好能发帖子。我在VC和BCB区都给你回答了。:D procedure TForm1.Button4Click(Sender: TObject);const CLSID_ActiveDesktop: TGUID = (D1: $75048700; D2: $EF1F; D3: $11D0;D4: ($98, $88, $00, $60, $97, $DE, $AC, $F9));var twpoComponentOpt : TComponentsOpt; ActiveDesktop : IActiveDesktop; Buffer : Array [0..1000]of WideChar; Addr : String; Endereco : PWideChar; WallpaperOptions : TWallpaperOpt;begin ActiveDesktop := CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop; with twpoComponentOpt do begin ZeroMemory(@twpoComponentOpt, SizeOf(TComponentsOpt)); dwSize := SizeOf(twpoComponentOpt); fEnableComponents := True; fActiveDesktop := True; end; ActiveDesktop.SetDesktopItemOptions(twpoComponentOpt, 0); ActiveDesktop.ApplyChanges(AD_APPLY_ALL); WallpaperOptions.dwStyle := WPSTYLE_STRETCH; WallpaperOptions.dwSize := SizeOf(WallpaperOptions); ActiveDesktop.SetWallpaperOptions(WallpaperOptions, 0); Addr := 'e:\books.html';//'http:////community.csdn.net//expert//forum.asp'; Endereco := StringToWideChar(Addr,Buffer,Length(Addr) + 1); ActiveDesktop.SetWallpaper(Endereco,0); ActiveDesktop.ApplyChanges(AD_APPLY_ALL or AD_APPLY_FORCE);end;上面的代码,设置本地的 html 是可以的,但设置其它网站的链接,还有问题 类型转换问题 能够在DBGRID用鼠标一下拉动后选拔中标多行吗?? 有谁知道jpeglib2.lib在哪里下载 一个刚开的好论坛,希望大家去灌水呀! 提滥了的问题:ADOConnection连Access(有数据库密码,无用户密码)出错 快快快 ,这个病毒害死我了 ! 关于获取数据库时间的问题! 关于DBImage组件使用的入门简单问题? 我访问DataModel上控件为什么说是地址为0 急,listview显示内容如何排序? 最后20分求delphi开发的一个问题, 对常用delphi进行数据库开发的人来说是小菜一碟……………….. 三层模式下,赋值出错,请高手指教!!!
Autor: Thomas Stutz
[Write new comment]
[ Print tip ] Tip Rating (6):
uses
ComObj, ShlObj, ActiveX;procedure EnableActiveDesktop(bValue: Boolean);
const
CLSID_ActiveDesktop: TGUID = (D1: $75048700; D2: $EF1F; D3: $11D0;
D4: ($98, $88, $00, $60, $97, $DE, $AC, $F9));
var
MyObject: IUnknown;
ActiveDesk: IActiveDesktop;
twpoComponentOpt: TComponentsOpt;
begin
MyObject := CreateComObject(CLSID_ActiveDesktop);
ActiveDesk := MyObject as IActiveDesktop;
with twpoComponentOpt do
begin
ZeroMemory(@twpoComponentOpt, SizeOf(TComponentsOpt));
dwSize := SizeOf(twpoComponentOpt);
fEnableComponents := bValue;
// fActiveDesktop := True;
end;
ActiveDesk.SetDesktopItemOptions(twpoComponentOpt, 0);
ActiveDesk.ApplyChanges(AD_APPLY_ALL);
end;
假如我要把桌面设置成G:\123.htm,应该怎么实现
假如我要把桌面设置成www.sohu.com,应该怎么实现
procedure SetWallpaper(WallpaperPath: String);
const
CLSID_ActiveDesktop: TGUID = '{75048700-EF1F-11D0-9888-006097DEACF9}';
var
ActiveDesktop: IActiveDesktop;
ComponentsOpt: TComponentsOpt;
WStr : PWideChar;
begin
WStr := AllocMem(MAX_PATH);
try
StringToWideChar(WallpaperPath, WStr, MAX_PATH);
ActiveDesktop := CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop;
ComponentsOpt.dwSize := sizeOf(ComponentsOpt);
ActiveDesktop.GetDesktopItemOptions(ComponentsOpt,0);
ComponentsOpt.fActiveDesktop := true; //启动ActiveDesktop
ActiveDesktop.SetDesktopItemOptions(ComponentsOpt,0);
ActiveDesktop.SetWallpaper(WStr, 0);
ActiveDesktop.ApplyChanges(AD_APPLY_ALL); //储存设定
finally
FreeMem(wstr);
end;
end;
const
CLSID_ActiveDesktop: TGUID = (D1: $75048700; D2: $EF1F; D3: $11D0;D4: ($98, $88, $00, $60, $97, $DE, $AC, $F9));
var
twpoComponentOpt : TComponentsOpt;
ActiveDesktop : IActiveDesktop;
Buffer : Array [0..1000]of WideChar;
Addr : String;
Endereco : PWideChar;
WallpaperOptions : TWallpaperOpt;
begin
ActiveDesktop := CreateComObject(CLSID_ActiveDesktop) as IActiveDesktop; with twpoComponentOpt do
begin
ZeroMemory(@twpoComponentOpt, SizeOf(TComponentsOpt));
dwSize := SizeOf(twpoComponentOpt);
fEnableComponents := True;
fActiveDesktop := True;
end;
ActiveDesktop.SetDesktopItemOptions(twpoComponentOpt, 0);
ActiveDesktop.ApplyChanges(AD_APPLY_ALL); WallpaperOptions.dwStyle := WPSTYLE_STRETCH;
WallpaperOptions.dwSize := SizeOf(WallpaperOptions);
ActiveDesktop.SetWallpaperOptions(WallpaperOptions, 0);
Addr := 'e:\books.html';//'http:////community.csdn.net//expert//forum.asp';
Endereco := StringToWideChar(Addr,Buffer,Length(Addr) + 1);
ActiveDesktop.SetWallpaper(Endereco,0);
ActiveDesktop.ApplyChanges(AD_APPLY_ALL or AD_APPLY_FORCE);
end;上面的代码,设置本地的 html 是可以的,但设置其它网站的链接,还有问题