Hello ��,
Wednesday, November 5, 2003, 9:34:15 AM, you wrote:
��Dû> Saya sedang mencoba membuat sebuah aplikasi yang dijalankan di Server.
��Dû> Dan saya ingin agar main form tersebut apabila di minimize oleh user akan
��Dû> masuk ke System tray, dan apabila icon di system tray di double klik maka
��Dû> main form tersebut akan show secara normal....
��Dû> saya telah mencari resource nya tapi sampai sekarang belum ketemu..
��Dû> Apakah rekan-rekan ada yang bisa membantu saya ??
coba pake JEDI VCL. ada demonya kok.
cari ke www.sourceforge.net
****************
atau coba pake ini
****************
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs, Menus, ShellAPI, ExtCtrls;
type
TForm1 = class(TForm)
PopupMenu1: TPopupMenu;
Open1: TMenuItem;
Exit1: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure Open1Click(Sender: TObject);
procedure Exit1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ private declarations }
procedure WndProc(var Msg : TMessage); override;
public
{ public declarations }
IconData : TNotifyIconData;
IconCount : integer;
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.WndProc(var Msg : TMessage);
var
aPoint : TPoint;
begin
case Msg.Msg of
WM_USER + 1:
case Msg.lParam of
WM_RBUTTONDOWN:
begin
SetForegroundWindow(Handle);
GetCursorPos(aPoint);
PopupMenu1.Popup(aPoint.x, aPoint.y);
PostMessage(Handle, WM_NULL, 0, 0);
end
end;
end;
inherited;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
BorderIcons := [biSystemMenu];
IconCount := 0;
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);
Shell_NotifyIcon(NIM_ADD, @IconData);
end;
procedure TForm1.Open1Click(Sender: TObject);
begin
Form1.Show;
ShowWindow(Application.Handle, SW_HIDE);
end;
procedure TForm1.Exit1Click(Sender: TObject);
begin
Shell_NotifyIcon(NIM_DELETE, @IconData);
Application.ProcessMessages;
Application.Terminate;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caNone;
Form1.Hide;
end;
begin
ShowWindow(Application.Handle, SW_HIDE);
end.
--
Best regards,
Irwan
[EMAIL PROTECTED]
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->
Berlangganan: [EMAIL PROTECTED]
Stop Berlangganan: [EMAIL PROTECTED]
Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/