怎样修改windows里的开始按钮的位图?
2006-02-04 13:34:41 来源:WEB开发网核心提示:/修改var Form1: TForm1; StartButton: hWnd; OldBitmap: THandle; NewImage: TPicture; / 将代码放入FormCreate事件PRocedure TForm1.FormCreate(Sender: TObject); begin NewImage
/修改
var
Form1: TForm1;
StartButton: hWnd;
OldBitmap: THandle;
NewImage: TPicture;
/ 将代码放入FormCreate事件
PRocedure TForm1.FormCreate(Sender: TObject);
begin
NewImage := TPicture.create;
NewImage.LoadFromFile('C:WindowsCircles.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通过。
更多精彩
赞助商链接