一个消息提示托盘程序的开发历程(采用socket技术,附源代码)三---客户端源代码[6]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 lcllcl987 的 blog

#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>

本文关键:一个消息提示托盘程序的开发历程(采用socket技术,附源代码)三---客户端源代码
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top