首页 | 社区 | 博客 | 招聘 | 文章 | 新闻 | 下载 | 读书 | 代码
亲,您未登录哦! 登录 | 注册

怎样修改windows里的开始按钮的位图

打印文章

分享到:
/修改

var
  Form1: TForm1;
  StartButton: hWnd;
  OldBitmap: THandle;
  NewImage: TPicture;

/ 将代码放入FormCreate事件

procedure TForm1.FormCreate(Sender: TObject);
begin
  NewImage := TPicture.create;
  NewImage.LoadFromFile('C:\Windows\Circles.BMP');
  StartButton := FindWindowEx
                 (FindWindow(
                    'Shell_TrayWnd', nil),
                     0,'Button', nil);
  OldBitmap := SendMessage(StartButton,
                           BM_SetImage, 0,
                           NewImage.Bitmap.Handle);
end;


/还原
procedure TForm1.FormDestroy(Sender: TObject);
begin
  SendMessage(StartButton,BM_SetImage,0,OldBitmap);
  NewImage.Free;
end;

for win98se/delphi 5.0通过。

本栏文章均来自于互联网,版权归原作者和各发布网站所有,本站收集这些文章仅供学习参考之用。任何人都不能将这些文章用于商业或者其他目的。( Pfan.cn )

编程爱好者论坛

本栏最新文章