⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 settingunit.cpp

📁 this a programme that you can use socket programme
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "SettingUnit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSettingForm *SettingForm;
//---------------------------------------------------------------------------
__fastcall TSettingForm::TSettingForm(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSettingForm::btnDefaultClick(TObject *Sender)
{
  edtPort->Text=String(6712);        
}
//---------------------------------------------------------------------------
void __fastcall TSettingForm::UpDownClick(TObject *Sender,
      TUDBtnType Button)
{
  if(edtPort->Text.Length()!=0)
  {
      int n=StrToInt(edtPort->Text);
      if(Button==btNext)
      {
         n++;
      }
      else if(Button==btPrev)
      {
         n--;
      }
      edtPort->Text=String(n);
  }
}
//---------------------------------------------------------------------------
void __fastcall TSettingForm::edtPortExit(TObject *Sender)
{
   if(edtPort->Text.Length()==0)
   {
     MessageDlg("Please input the server's port!",mtError,TMsgDlgButtons()<<mbOK,0);
     edtPort->SetFocus();
   }
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -