我倒是想帮你看看,可是我不懂你的意思
桌面图标的文字本来不就是透明的么?
或者你告诉我那个API,我去看看帮助它是干什么使的,可能就明白你的意思了
桌面图标的文字本来不就是透明的么?
或者你告诉我那个API,我去看看帮助它是干什么使的,可能就明白你的意思了
解决方案 »
- 紧急求救!!!如何向后台程序发送ALT+W这样按键消息???
- 如何将查询出来显示到DBGridEH上的数据通过QReport打印出来?
- 在Borland Developer Studio 2006环境下 想学.NET 行吗 给推荐几本书
- DLL封装的窗口问题:关闭dll窗口后,为什么MDI主窗口就最小化了?
- 从左边开始取字符串,为什么错????
- adodataset连接数据表的问题,在线等!
- 在线等待 - 40 分 求 关于菜单设计的问题(很奇怪的问题)
- 怎么不能给RichEdit发消息?
- 为什么我不能用Google.com搜索本论坛的文章?
- 谁用过acm相关控健!如tacmconvertor,tacmin,tacmout等!我急需相关资料
- Delphi 7 竟然没有 QuickReport ?! Really??
- 关于listview的小问题
begin
Wnd := GetDesktopWindow;
Wnd := FindWindowEx(Wnd, 0, 'Progman', nil); Wnd := FindWindowEx(Wnd, 0, 'SHELLDLL_DefView', nil); Wnd := FindWindowEx(Wnd, 0, 'SysListView32', nil); SendMessage(Wnd, $1026, 0, $ffffffff); //this
SendMessage(Wnd, $1024, 0, $00ffffff);
InvalidateRect(Wnd, nil, TRUE);
以上的代码是将桌面图标的文字背景色设为透明,有兴趣的试一下!!我想做成一个实时更新的,现在有很多软件已经可以了!
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,CommCtrl, StdCtrls ;type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function GetDesktopHand: THandle;
procedure SetTextColor(ForeClr, BackClr: TColor);
end;var
Form1: TForm1;implementation{$R *.dfm}function TForm1.GetDesktopHand: THandle;
begin
Result:=FindWindow('progman',nil);
Result:=GetWindow(Result,GW_Child);
Result:=GetWindow(Result,GW_Child);
end;procedure TForm1.SetTextColor(ForeClr, BackClr: TColor);
var Hand: THandle;
begin
Hand:= GetDesktopHand;
Listview_SetTextColor(Hand,ForeClr); // 设置文字前景色;
Listview_SetTextBkColor(Hand,BackClr); // 设置文字背景色,crNone 为透明;
Listview_RedrawItems(Hand,0,Listview_GetItemCount(Hand)); // 重画;
end;procedure TForm1.Button1Click(Sender: TObject);
begin
SetTextColor(crNone,crNone);
end;end.
没有“重新刷新后,又恢复为不透明啊”
另外顺便问sean2000(地宽天高)和xzhifei (飞)一个问题,
问什么我给别的程序的状态栏(status window)发SB_GETTEXT得不到其内容呢?
有什么办法解决?
delphi的函数可以有多个返回值么?
(function TForm1.GetDesktopHand: THandle;
begin
Result:=FindWindow('progman',nil);
Result:=GetWindow(Result,GW_Child);
Result:=GetWindow(Result,GW_Child);
end;
)