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

📄 test_comm.dfm

📁 本源码采用spcomm串口控件
💻 DFM
字号:
object Series_frm: TSeries_frm
  Left = 193
  Top = 106
  AutoScroll = False
  BorderIcons = []
  Caption = '串口通信精灵'
  ClientHeight = 405
  ClientWidth = 536
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  Icon.Data = {
    0000010002002020100000000000E80200002600000010101000000000002801
    00000E0300002800000020000000400000000100040000000000800200000000
    0000000000000000000000000000000000000000800000800000008080008000
    0000800080008080000080808000C0C0C0000000FF0000FF000000FFFF00FF00
    0000FF00FF00FFFF0000FFFFFF00000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000F0000B00000000FB0000000000000000F000B0000000
    000FB003000000000000F00BF00000000000FB00000000000F00F0BF00000000
    00003000000000000F000B0000000000000B300B000000000F00BFBBB0000000
    000B300FB00000000F0B00000000000000BB3000FB00000000B0000000000000
    00BB30000FB000000BFBBBB0000000000FBB300000FB0000BF00000000000000
    0FBB3000000FB00BF0000000000000000FBB30000000F0BF0000000000000000
    0FBB300000000FF000000000000000000FBB33000000BFFB0000000000000000
    0FBB3300000BF00FB0000000000000000FFB333000BF0000FB00000000000000
    00FBB3330BF000000FB000000000000000FFB330BF00000000FB000000000000
    000FBB0BF3000000000FB00000000000000FB0BF333000000000000000000000
    00000BF333333000000000B000000F0B0000BFFBBB333333333330FB00000F0B
    000BF00FBBBBBB333330000FB0000F0B00BF00000FFFFBBBB000000000000F0B
    0BF00000000000000000000000000F00BF000000000000000000000000000F00
    00000000000000000000000000000FFFFFFF0000000000000000000000000000
    0000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFEFFFF33FC63
    FF27FE07FF07FF0FF90FFE0FF907FC07F807FC23F8FFF831F81FF838F01FF03C
    63FFF03E07FFF03F0FFFF03F0FFFF01E07FFF01C63FFF008F1FFF801F8FFF803
    FC6FFC01FE0FFC007E1FFE00000F8E0000078C00006788E001FF81F807FF83FF
    FFFF80FFFFFF80FFFFFFFFFFFFFF280000001000000020000000010004000000
    0000C00000000000000000000000000000000000000000000000000080000080
    00000080800080000000800080008080000080808000C0C0C0000000FF0000FF
    000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0000000000000000000000
    000000000000000B0000000000000000B00000F00F00000B0B0000F0FB00000B
    00B00000000000FB000B00F0000000FB00000F00000000FB3000FB00000000FB
    300F00B00000000F30F0000B0000000F0F3000000000FB00FBB333330B00FB0F
    00FFBB000000F0F0000000000000FFFF000000000000FFFF7019FFFF0000E9F3
    FE47F3D30035E3C3FE42C5C78035C69FFE50C73F7174C63F7E49C0DF2178C1EB
    A031E0E700002003DE00081F4E001FFF01000FFF0000}
  Menu = MainMenu
  OldCreateOrder = False
  Position = poScreenCenter
  OnCreate = FormCreate
  OnDestroy = FormDestroy
  PixelsPerInch = 96
  TextHeight = 13
  object Label4: TLabel
    Left = 158
    Top = 4
    Width = 60
    Height = 13
    Caption = '发送字符:'
  end
  object Label5: TLabel
    Left = 409
    Top = 4
    Width = 60
    Height = 13
    Caption = '发送形式:'
  end
  object Com_set: TComboBox
    Left = 1
    Top = 0
    Width = 55
    Height = 21
    ItemHeight = 13
    TabOrder = 0
    Text = 'COM1'
    OnChange = Com_setChange
    Items.Strings = (
      'COM1'
      'COM2'
      'COM3'
      'COM4')
  end
  object baud_set: TComboBox
    Left = 56
    Top = 0
    Width = 98
    Height = 21
    ItemHeight = 13
    TabOrder = 1
    Text = '9600'
    OnChange = baud_setChange
    Items.Strings = (
      '300'
      '1200'
      '2400'
      '4800'
      '9600'
      '19200'
      '38400'
      '57600'
      '115200'
      '230400'
      '460800'
      '921600')
  end
  object M: TMemo
    Left = 0
    Top = 176
    Width = 536
    Height = 229
    Align = alBottom
    Lines.Strings = (
      '')
    ReadOnly = True
    ScrollBars = ssVertical
    TabOrder = 2
  end
  object E: TEdit
    Left = 225
    Top = 0
    Width = 180
    Height = 21
    Cursor = crIBeam
    TabOrder = 3
    Text = '1,2,3,4,A,B,C,D'
    OnKeyDown = EKeyDown
  end
  object HEX: TCheckBox
    Left = 476
    Top = 2
    Width = 44
    Height = 17
    Caption = 'HEX'
    TabOrder = 4
    OnClick = HEXClick
  end
  object Panel1: TPanel
    Left = 0
    Top = 22
    Width = 537
    Height = 155
    BevelInner = bvRaised
    BevelOuter = bvLowered
    TabOrder = 5
    object Label1: TLabel
      Left = 329
      Top = 11
      Width = 108
      Height = 13
      AutoSize = False
      Caption = '定时发送时间(ms)'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object Label6: TLabel
      Left = 329
      Top = 38
      Width = 108
      Height = 13
      AutoSize = False
      Caption = '接收时间超时(ms)'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object DHBH: TSpeedButton
      Left = 332
      Top = 60
      Width = 199
      Height = 28
      Caption = '电话拨号'
      Flat = True
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clMaroon
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Glyph.Data = {
        F6000000424DF600000000000000760000002800000010000000100000000100
        0400000000008000000000000000000000001000000000000000000000000000
        8000008000000080800080000000800080008080000080808000C0C0C0000000
        FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00888888888888
        8888888888880000000888888000888888088888088870888808888088F88008
        8808880880F088777708808808F008888808088088F888888808087888F88777
        8808088008F8888888088F8808F878078808800888F888888808880088F8F8FF
        8808888888F878078808888888F888888808888888FFFFFFFF08}
      ParentFont = False
      OnClick = DHBHClick
    end
    object JO: TRadioGroup
      Left = 6
      Top = 5
      Width = 153
      Height = 84
      Caption = '奇偶校验'
      Color = clActiveBorder
      Columns = 2
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clBlue
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ItemIndex = 2
      Items.Strings = (
        '偶校验'
        '奇校验'
        '无校验'
        '空'
        '标记')
      ParentColor = False
      ParentFont = False
      TabOrder = 0
      OnClick = JOClick
    end
    object SJW: TRadioGroup
      Left = 160
      Top = 5
      Width = 95
      Height = 84
      Caption = '数据位'
      Columns = 2
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clRed
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ItemIndex = 3
      Items.Strings = (
        '5'
        '6'
        '7'
        '8')
      ParentFont = False
      TabOrder = 1
      OnClick = SJWClick
    end
    object TZW: TRadioGroup
      Left = 256
      Top = 5
      Width = 71
      Height = 84
      Caption = '停止位'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clTeal
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ItemIndex = 0
      Items.Strings = (
        '1'
        '1.5'
        '2')
      ParentFont = False
      TabOrder = 2
      OnClick = TZWClick
    end
    object Timer_T: TEdit
      Left = 436
      Top = 8
      Width = 95
      Height = 21
      TabOrder = 3
      Text = '1000'
      OnChange = Timer_TChange
    end
    object JSjg: TEdit
      Left = 436
      Top = 37
      Width = 95
      Height = 21
      TabOrder = 4
      Text = '100'
      OnChange = JSjgChange
    end
    object CTS_ON: TRadioGroup
      Left = 6
      Top = 120
      Width = 134
      Height = 32
      Caption = 'CTS(INPUT ON/OFF)'
      Columns = 2
      ItemIndex = 1
      Items.Strings = (
        'ON'
        'OFF')
      TabOrder = 5
      OnClick = CTS_ONClick
    end
    object RTS_SET: TRadioGroup
      Left = 6
      Top = 88
      Width = 526
      Height = 32
      Caption = 
        'RTS(RtsEnable, RtsDiable, RtsHandshake, RtsTransmissionAvailabl' +
        'eControl)'
      Columns = 4
      Items.Strings = (
        'Disable'
        'Enable'
        'Handshake'
        'TransmissionAvailable')
      TabOrder = 6
      OnClick = RTS_SETClick
    end
    object DTR_Set: TRadioGroup
      Left = 141
      Top = 120
      Width = 391
      Height = 32
      Caption = 'DTR(DtrEnable, DtrDiable, DtrHandshake)'
      Columns = 3
      ItemIndex = 0
      Items.Strings = (
        'DtrEnable'
        'DtrDisable'
        'DtrHandshake')
      TabOrder = 7
      OnClick = DTR_SetClick
    end
  end
  object Comm_Trans: TComm
    CommName = 'COM1'
    BaudRate = 9600
    ParityCheck = True
    Outx_CtsFlow = False
    Outx_DsrFlow = False
    DtrControl = DtrEnable
    DsrSensitivity = True
    TxContinueOnXoff = True
    Outx_XonXoffFlow = True
    Inx_XonXoffFlow = True
    ReplaceWhenParityError = True
    IgnoreNullChar = True
    RtsControl = RtsEnable
    XonLimit = 500
    XoffLimit = 500
    ByteSize = _8
    Parity = None
    StopBits = _1
    XonChar = #17
    XoffChar = #19
    ReplacedChar = #0
    ReadIntervalTimeout = 100
    ReadTotalTimeoutMultiplier = 0
    ReadTotalTimeoutConstant = 0
    WriteTotalTimeoutMultiplier = 0
    WriteTotalTimeoutConstant = 0
    OnReceiveData = Comm_TransReceiveData
    OnReceiveError = Comm_TransReceiveError
    OnModemStateChange = Comm_TransModemStateChange
    OnRequestHangup = Comm_TransRequestHangup
    Left = 400
    Top = 312
  end
  object MainMenu: TMainMenu
    AutoHotkeys = maManual
    AutoLineReduction = maManual
    Left = 432
    Top = 312
    object N2: TMenuItem
      Caption = '定时发送'
      OnClick = N2Click
    end
    object N3: TMenuItem
      Caption = '停止'
      OnClick = N3Click
    end
    object N4: TMenuItem
      Caption = '清除'
      OnClick = N4Click
    end
    object N5: TMenuItem
      Caption = '退出'
      OnClick = N5Click
    end
    object N1: TMenuItem
      Caption = '关于'
      OnClick = N1Click
    end
  end
  object Timer: TTimer
    Enabled = False
    OnTimer = TimerTimer
    Left = 368
    Top = 312
  end
end

⌨️ 快捷键说明

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