MyServer.cpp
上传用户:lulishicai
上传日期:2010-03-01
资源大小:13202k
文件大小:1k
源码类别:
Delphi/CppBuilder
开发平台:
C++ Builder
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #pragma hdrstop
- #include "MyServer.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- Boolean Flag;
- TServerForm *ServerForm;
- //---------------------------------------------------------------------------
- __fastcall TServerForm::TServerForm(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TServerForm::Button1Click(TObject *Sender)
- {
- ServerForm->DdeServerItem1->Text=ServerForm->Memo1->Text;
- }
- //---------------------------------------------------------------------------
- void __fastcall TServerForm::DdeServerItem1PokeData(TObject *Sender)
- {
- Flag=true;
- Memo2->Lines=DdeServerItem1->Lines;
- Flag=false;
- }
- //---------------------------------------------------------------------------
- void __fastcall TServerForm::Button2Click(TObject *Sender)
- {
- Close();
- }
- //---------------------------------------------------------------------------
- void __fastcall TServerForm::Memo1Change(TObject *Sender)
- {
- if(!Flag)
- DdeServerItem1->Lines=Memo1->Lines;
- }
- //---------------------------------------------------------------------------