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

📄 dlgsetting.frm

📁 上位机是VB设置成的界面;下位机是用C编释的51单片机的温度采集模块。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form dlgSetting 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "串口通信参数设置"
   ClientHeight    =   3090
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   5025
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3090
   ScaleWidth      =   5025
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2400
      TabIndex        =   2
      Top             =   2520
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Top             =   2520
      Width           =   1095
   End
   Begin VB.Frame frmSetting 
      Caption         =   "参数设置"
      Height          =   1815
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   4575
      Begin VB.TextBox txtPort 
         Height          =   270
         Left            =   1080
         TabIndex        =   9
         Text            =   "1"
         Top             =   360
         Width           =   975
      End
      Begin VB.TextBox txtTime 
         Height          =   270
         Left            =   1320
         TabIndex        =   8
         Text            =   "Text3"
         Top             =   1080
         Width           =   1455
      End
      Begin VB.TextBox txtSetting 
         Height          =   270
         Left            =   3120
         TabIndex        =   7
         Text            =   "9600"
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "ms发送一次"
         Height          =   255
         Left            =   2880
         TabIndex        =   6
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "串口测试"
         Height          =   255
         Left            =   2280
         TabIndex        =   5
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "发送时间间隔"
         Height          =   255
         Left            =   120
         TabIndex        =   4
         Top             =   1080
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "所用串口:"
         Height          =   255
         Left            =   120
         TabIndex        =   3
         Top             =   360
         Width           =   975
      End
   End
End
Attribute VB_Name = "dlgSetting"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*****************************************************
'确定按钮
'*****************************************************
Private Sub Command1_Click()
intPort = Val(dlgSetting.txtPort.Text)
intTime = Val(dlgSetting.txtTime.Text)
strSet = dlgSetting.txtSetting.Text
If Not frmMain.ctrMSComm.CommPort = intPort Then
frmMain.ctrMSComm.CommPort = intPort
frmMain.ctrMSComm.Settings = strSet

frmMain.ctrMSComm.PortOpen = True
End If
If Not binAutoSendFlag Then
frmMain.ctrMSComm.PortOpen = False
End If
dlgSetting.Hide
Unload dlgSetting
End Sub
'***********************************************
'取消按钮
'***********************************************
Private Sub Command2_Click()

dlgSetting.Hide
Unload dlgSetting

End Sub


⌨️ 快捷键说明

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