Pnf Posted November 27, 2005 at 07:26 PM Report #7511 Posted November 27, 2005 at 07:26 PM boas, alguem sabe como fazer com que o icone do programa feito a delphi, apareça na barra de tarefas á beira do relogio? agradecia....
NCS_One Posted November 27, 2005 at 08:51 PM Report #7520 Posted November 27, 2005 at 08:51 PM Ois Ja te respondi em : http://www.btuga.info/viewthread.php?tid=64736&page=1#pid673109 Nao vi antes k tinhas posto aki tb se nao tinha respondido aki. Se a vida te voltar as costas aproveita e apalpa-lhe o cu.
NCS_One Posted November 27, 2005 at 09:00 PM Report #7522 Posted November 27, 2005 at 09:00 PM Ois Vou colocar tb aki porque pode alguem no futuro voltar a fazer a mm pergunta e assim so tem de fazer um pesquisar. Unit Unit1; Interface Uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ShellAPI; Type TForm1 = Class(TForm) Button1: TButton; Procedure FormCreate(Sender: TObject); Procedure Button1Click(Sender: TObject); Private IconData: TNotifyIconData; Procedure CreateTrayIcon; Procedure MinimizeToTray; Procedure RestoreFromTray; Procedure FormDestroy(Sender: TObject); public procedure WndProc(var Msg : TMessage); override; End; Var Form1: TForm1; Implementation {$R *.dfm} Procedure TForm1.WndProc(Var Msg : TMessage); Begin Case Msg.Msg Of WM_USER + 1: Case Msg.lParam Of WM_RBUTTONDOWN:; WM_LBUTTONDBLCLK: RestoreFromTray; End; End; Inherited; end; Procedure TForm1.CreateTrayIcon; Begin IconData.cbSize := sizeof(IconData); IconData.Wnd := Handle; IconData.uID := 100; IconData.uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP; IconData.uCallbackMessage := WM_USER + 1; IconData.hIcon := Application.Icon.Handle; StrPCopy(IconData.szTip, Application.Title); End; Procedure TForm1.MinimizeToTray; Begin Shell_NotifyIcon(NIM_ADD, @IconData); Form1.Hide; ShowWindow(Application.Handle, SW_HIDE); End; Procedure TForm1.RestoreFromTray; Begin Shell_NotifyIcon(NIM_DELETE, @IconData); ShowWindow(Application.Handle, SW_SHOW); Form1.Show; Application.BringToFront; End; Procedure TForm1.FormDestroy(Sender: TObject); Begin Shell_NotifyIcon(NIM_DELETE, @IconData); End; Procedure TForm1.FormCreate(Sender: TObject); Begin CreateTrayIcon; End; Procedure TForm1.Button1Click(Sender: TObject); Begin MinimizeToTray; End; End. Se a vida te voltar as costas aproveita e apalpa-lhe o cu.
vbmaster Posted November 28, 2005 at 12:26 AM Report #7555 Posted November 28, 2005 at 12:26 AM isto de andarem entre dois mundos é confuso... ( 😛 )
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now