.h file
void __fastcall TForm1::WndProc(Messages::TMessage& Message);//回调函数
void __fastcall TForm1::AddTrayIcon();//添加托盘
void __fastcall TForm1::RemoveTrayIcon();//移除托盘
void __fastcall TForm1::ModifyTrayIcon(TImage *img, String tip);//修改托盘
unsigned int iconmessage;//定义的托盘消息
HICON __fastcall TForm1::IconHandle(TImage *img);//获取图标句柄
void __fastcall TForm1::StartServer(String hint);
void __fastcall TForm1::StopServer(String hint);
bool start;//启动标志
String hint,hint1,hint2; //提示信息
//---------------------------------------------------------------------------
#include <vcl.h>
#include "mem.h"
#include "string.h"
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "trayicon"
#pragma resource "*.dfm"
TForm1 *Form1;
/*
typedef struct _NOTIFYICONDATA { // nid
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
char szTip[64];
} NOTIFYICONDATA, *PNOTIFYICONDATA;
*/
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}