/修改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通过。
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18