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

📄 mainform.dfm

📁 一个简明的串口通讯例子
💻 DFM
字号:
object FormMain: TFormMain
  Left = 192
  Top = 106
  BorderStyle = bsDialog
  Caption = '串口测试程序'
  ClientHeight = 226
  ClientWidth = 478
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -12
  Font.Name = '宋体'
  Font.Style = []
  OldCreateOrder = False
  Position = poScreenCenter
  OnClose = FormClose
  PixelsPerInch = 96
  TextHeight = 12
  object Bevel1: TBevel
    Left = 8
    Top = 4
    Width = 221
    Height = 213
    Shape = bsFrame
  end
  object Label1: TLabel
    Left = 24
    Top = 72
    Width = 57
    Height = 13
    AutoSize = False
    Caption = '波特率'
  end
  object Label2: TLabel
    Left = 392
    Top = 20
    Width = 72
    Height = 12
    Caption = '(范围:0-255)'
  end
  object Label3: TLabel
    Left = 24
    Top = 140
    Width = 193
    Height = 65
    AutoSize = False
    Caption = 
      '设置好以上参数后单击开始/停止按钮即可开始或停止收发数据。接收到' +
      '的数据会自动显示在右边的文本框中;每发送一个数据需先填好数据后单' +
      '击一次发送按钮'
    WordWrap = True
  end
  object Bevel2: TBevel
    Left = 248
    Top = 4
    Width = 221
    Height = 213
    Shape = bsFrame
  end
  object Label4: TLabel
    Left = 264
    Top = 44
    Width = 197
    Height = 29
    AutoSize = False
    Caption = '接收到的数据的显示形式依次为:   序号 10进制数  16进制数'
    WordWrap = True
  end
  object RadioGroupCOM: TRadioGroup
    Left = 20
    Top = 12
    Width = 193
    Height = 45
    Caption = '选择串口'
    Columns = 2
    ItemIndex = 0
    Items.Strings = (
      'C0M1'
      'COM2')
    TabOrder = 0
  end
  object EditBaud: TEdit
    Left = 92
    Top = 68
    Width = 121
    Height = 20
    TabOrder = 1
    Text = '9600'
  end
  object EditSendData: TEdit
    Left = 332
    Top = 16
    Width = 53
    Height = 20
    TabOrder = 2
    Text = '1'
  end
  object MemoRcvData: TMemo
    Left = 260
    Top = 80
    Width = 197
    Height = 125
    TabOrder = 3
  end
  object ButtonSend: TButton
    Left = 264
    Top = 12
    Width = 61
    Height = 25
    Caption = '发送数据 '
    TabOrder = 4
    OnClick = ButtonSendClick
  end
  object ButtonOK: TButton
    Left = 80
    Top = 100
    Width = 75
    Height = 25
    Caption = '开始'
    TabOrder = 5
    OnClick = ButtonOKClick
  end
end

⌨️ 快捷键说明

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