源程序代码如下:
//“Unit1.h"的源代码
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//----------------------------------------- -------------------------------
#include $#@60;Classes.hpp$#@62;
#include $#@60;Controls.hpp$#@62;
#include $#@60;StdCtrls.hpp$#@62;
#include $#@60;Forms.hpp$#@62;
#include $#@60;ComCtrls.hpp$#@62;
#include $#@60;Dialogs.hpp$#@62;
#include $#@60;ExtCtrls.hpp$#@62;
#include $#@60;ExtDlgs.hpp$#@62;
#include $#@60;NMSTRM.hpp$#@62;
#include $#@60;Psock.hpp$#@62;
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
TButton *Button2;
TNMStrm *NMStrm1;
TNMStrmServ *NMStrmServ1;
TOpenPictureDialog *OpenPictureDialog1;
TImage *Image1;
TLabel *Label1;
TEdit *Edit1;
TButton *Button3;
TEdit *Edit2;
TStatusBar *StatusBar1;
void __fastcall Button3Click(TObject *Sender);
void __fastcall Button1Click(TObject *Sender);
void __fastcall Button2Click(TObject *Sender);
void __fastcall NMStrm1Connect(TObject *Sender);
void __fastcall NMStrm1ConnectionFailed(TObject *Sender);
void __fastcall NMStrm1Disconnect(TObject *Sender);
void __fastcall NMStrm1HostResolved(TComponent *Sender);
void __fastcall NMStrm1MessageSent(TObject *Sender);
void __fastcall NMStrm1PacketSent(TObject *Sender);
void __fastcall NMStrm1Status(TComponent *Sender, AnsiString Status);
void __fastcall NMStrm1InvalidHost(bool &Handled);
void __fastcall NMStrmServ1ClientContact(TObject *Sender);
void __fastcall NMStrmServ1MSG(TComponent *Sender,
const AnsiString sFrom, TStream *strm);
void __fastcall NMStrmServ1Status(TComponent *Sender,
AnsiString Status);
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif