Buscar

Alterar o ícone do botão iniciar do windows

Código

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:Delphi3ImagesDEFAULTOutOpen.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;

valeu?FIU...

Publicidade

Vote na dica




Quantidade de votos: 0 votos
Aceitação: 0%


Detalhes da dica

Categoria: Windows
Adicionada dia: 09/03/07
Por: Ladghelson Santos
Visualizada: 3994 vezes

Planeta Delphi - Tudo sobre programação Delphi Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009