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

📄 comset.frm

📁 master440变频器的上位机程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form ComSet 
   BackColor       =   &H00FFC0C0&
   Caption         =   "通讯设置"
   ClientHeight    =   1815
   ClientLeft      =   60
   ClientTop       =   405
   ClientWidth     =   3840
   Icon            =   "ComSet.frx":0000
   LinkTopic       =   "Form2"
   ScaleHeight     =   1815
   ScaleWidth      =   3840
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "确  定"
      Height          =   375
      Left            =   2520
      TabIndex        =   4
      Top             =   240
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2520
      TabIndex        =   3
      Top             =   1080
      Width           =   975
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   1080
      TabIndex        =   2
      Text            =   "Combo1"
      Top             =   240
      Width           =   1095
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      Left            =   1080
      TabIndex        =   1
      Text            =   "Combo2"
      Top             =   720
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Left            =   1080
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   1200
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "串  口"
      Height          =   255
      Left            =   360
      TabIndex        =   7
      Top             =   320
      Width           =   615
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FFC0C0&
      Caption         =   "波特率"
      Height          =   255
      Left            =   360
      TabIndex        =   6
      Top             =   780
      Width           =   615
   End
   Begin VB.Label Label3 
      BackColor       =   &H00FFC0C0&
      Caption         =   "地  址"
      Height          =   255
      Left            =   360
      TabIndex        =   5
      Top             =   1260
      Width           =   615
   End
End
Attribute VB_Name = "ComSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()                    '载入时设定波特率为19200,地址为1,端口为COM1
 Dim d%
     For d = 1 To 4
         Combo1.AddItem ("COM" & CStr(d))
     Next
         Combo1.ListIndex = 0
                                      
         Combo2.AddItem "1200"
         Combo2.AddItem "2400"
         Combo2.AddItem "4800"
         Combo2.AddItem "9600"
         Combo2.AddItem "19200"
         Combo2.ListIndex = 4
         Text1.Text = 11
End Sub
Private Sub Command1_Click()               '退出
Unload Me
End Sub
Private Sub Command2_Click()               '退出
Unload Me
End Sub
Private Sub Text1_LostFocus()              '变频器地址设定,31为广播位
    If (Text1.Text < 0) Then
        Text1.Text = O
    End If
    
If (Text1.Text > 31) Then
        Text1.Text = 31
    End If
End Sub

⌨️ 快捷键说明

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