API - mudar o bitmap do botao iniciar |
Top Previous Next |
// testei no w2000 e nao fun // Alterar o ícone do botão iniciar do Windows // Variáveis globais do form: var Form1: TForm1; Iniciar : hWnd; OldBitmap : THandle; NewImage : TPicture;
// No Oncreate do Form: procedure TForm1.FormCreate(Sender: TObject); begin NewImage:=TPicture.create; NewImage.LoadFromFile('C:\Delphi3\Images\DEFAULT\OutOpen.BMP'); Iniciar := FindWindowEx(FindWindow('Shell_TrayWnd',nil),0,'Button',nil); OldBitmap:=SendMessage(Iniciar,BM_SetImage,0,NewImage.Bitmap.Handle); end;
// No OnDestroy procedure TForm1.FormDestroy(Sender: TObject); begin SendMessage(Iniciar,BM_SetImage,0,OldBitmap); NewImage.Free; end; |