首页  编辑  

更改开始菜单位图

Tags: /超级猛料/OS.操作系统/开始菜单/   Date Created:

var  

 Form1: TForm1;  

 StartButton: hWnd;  

 OldBitmap: THandle;  

 NewImage: TPicture;  

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;