MyServer.cpp
上传用户:lulishicai
上传日期:2010-03-01
资源大小:13202k
文件大小:1k
源码类别:

Delphi/CppBuilder

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "MyServer.h"
  5. //---------------------------------------------------------------------------
  6. #pragma package(smart_init)
  7. #pragma resource "*.dfm"
  8. Boolean Flag;
  9. TServerForm *ServerForm;
  10. //---------------------------------------------------------------------------
  11. __fastcall TServerForm::TServerForm(TComponent* Owner)
  12.         : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16. void __fastcall TServerForm::Button1Click(TObject *Sender)
  17. {
  18. ServerForm->DdeServerItem1->Text=ServerForm->Memo1->Text;
  19. }
  20. //---------------------------------------------------------------------------
  21. void __fastcall TServerForm::DdeServerItem1PokeData(TObject *Sender)
  22. {
  23. Flag=true;
  24. Memo2->Lines=DdeServerItem1->Lines;
  25. Flag=false;
  26. }
  27. //---------------------------------------------------------------------------
  28. void __fastcall TServerForm::Button2Click(TObject *Sender)
  29. {
  30. Close();
  31. }
  32. //---------------------------------------------------------------------------
  33. void __fastcall TServerForm::Memo1Change(TObject *Sender)
  34. {
  35. if(!Flag)
  36.  DdeServerItem1->Lines=Memo1->Lines;
  37. }
  38. //---------------------------------------------------------------------------