Mega Code Archive

 
Categories / Delphi / Graphic
 

Change the Windows Start button bitmap

Title: Change the Window's Start button bitmap Question: How to change windows start button bitmap Answer: { define Global vars } var Form1: TForm1; StartButton: hWnd; OldBitmap: THandle; NewImage: TPicture; { put the Code in the OnCreate event of your form } 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; { OnDestroy-Event } procedure TForm1.FormDestroy(Sender: TObject); begin SendMessage(StartButton,BM_SetImage,0,OldBitmap); NewImage.Free; end;