#include "trayicon.h"
#include <imglist.hpp>
#include <menus.hpp>
#include <adodb.hpp>
#include <db.hpp>
#include <dbgrids.hpp>
#include <extctrls.hpp>
#include <grids.hpp>
#include <scktcomp.hpp>
#include <comctrls.hpp>
#include <graphics.hpp>
//---------------------------------------------------------------------------
class tform1 : public tform
{
__published: // ide-managed components
ttrayicon *trayicon1;
tpopupmenu *popupmenu1;
tmenuitem *n2;
tmenuitem *n3;
timagelist *imagelist1;
ttimer *timer2;
tgroupbox *groupbox1;
tclientsocket *clientsocket1;
tbutton *btnconnect;
tbutton *btndisconnect;
tstatusbar *statusbar1;
tstringgrid *stringgrid1;
timage *image1;
tlabel *label1;
void __fastcall n2click(tobject *sender);
void __fastcall trayicon1click(tobject *sender);
void __fastcall timer2timer(tobject *sender);
void __fastcall btnconnectclick(tobject *sender);
void __fastcall clientsocket1connect(tobject *sender,
tcustomwinsocket *socket);
void __fastcall clientsocket1read(tobject *sender,
tcustomwinsocket *socket);
void __fastcall clientsocket1disconnect(tobject *sender,
tcustomwinsocket *socket);
void __fastcall btndisconnectclick(tobject *sender);
void __fastcall clientsocket1error(tobject *sender,
tcustomwinsocket *socket, terrorevent errorevent,
int &errorcode);
void __fastcall formclose(tobject *sender, tcloseaction &action);
void __fastcall formclick(tobject *sender);
void __fastcall n3click(tobject *sender);
void __fastcall image1click(tobject *sender);
void __fastcall formshow(tobject *sender);
private: // user declarations
bool iscall;
int capa; //任务数
string server;
public: // user declarations
__fastcall tform1(tcomponent* owner);
strcount(string substing, string sourcestr);
};
//---------------------------------------------------------------------------
extern package tform1 *form1;
//---------------------------------------------------------------------------
#endif
然后是about界面:
unit3.cpp
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
tformabout *formabout;
//---------------------------------------------------------------------------
__fastcall tformabout::tformabout(tcomponent* owner)
: tform(owner)
{
}
//---------------------------------------------------------------------------
void __fastcall tformabout::button1click(tobject *sender)
{
modalresult = mrok;
}
//---------------------------------------------------------------------------
unit3.h
//---------------------------------------------------------------------------
#ifndef unit3h
#define unit3h
//---------------------------------------------------------------------------
#include <classes.hpp>
#include <controls.hpp>