CSDN博客

img laoli

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

发表于2001/10/8 2:43:00  903人阅读

/修改

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通过。

0 0

相关博文

我的热门文章

img
取 消
img