How to modify the bitmap of the start button in Windows?

zhaozj2021-02-11  214

/ Modify var Form1: TForm1; StartButton: hWnd; OldBitmap: THandle; NewImage: TPicture; / event code into 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) ;

/ Restore Procedure TFORM1.FORMDESTROY (Sender: TOBJECT); Begin SendMessage (StartButton, BM_SetImage, 0, Oldbitmap); NewImage.Free;

For Win98SE / Delphi 5.0.

转载请注明原文地址:https://www.9cbs.com/read-5814.html

New Post(0)