Mirror

Change the Windows start button bitmap (Views: 101)


Problem/Question/Abstract:

Change your windows start button image

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;

<< Back to main page