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

📄 frmset.frm

📁 VB写PC端ISP程序W78E516UpdataOfVB,请配合本人用C51写的华邦8位单片机ISP程序w78e516_ISPofC51使用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmSet 
   Caption         =   "通信设置"
   ClientHeight    =   1935
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   3345
   Icon            =   "FrmSet.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   1935
   ScaleWidth      =   3345
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   1935
      Index           =   0
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   3375
      Begin VB.CommandButton Command2 
         Caption         =   "取消"
         Height          =   375
         Left            =   1800
         TabIndex        =   6
         Top             =   1320
         Width           =   1095
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确定"
         Height          =   375
         Left            =   480
         TabIndex        =   5
         Top             =   1320
         Width           =   1095
      End
      Begin VB.ComboBox Comb 
         Height          =   300
         Index           =   0
         Left            =   1200
         TabIndex        =   2
         Text            =   "9600"
         Top             =   360
         Width           =   1935
      End
      Begin VB.ComboBox Comb 
         Height          =   300
         Index           =   1
         Left            =   1200
         TabIndex        =   1
         Top             =   720
         Width           =   1935
      End
      Begin VB.Label lb 
         Caption         =   "通信速度"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   4
         Top             =   360
         Width           =   975
      End
      Begin VB.Label lb 
         Caption         =   "通信端口"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   3
         Top             =   840
         Width           =   855
      End
   End
End
Attribute VB_Name = "FrmSet"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
 Dim i As Byte
 Dim STR As String
 SysInfomation.MsComString = Me.Comb(0).Text + ",n,8,1"
 STR = Comb(1).Text
 STR = Mid(STR, 4, Len(STR) - 3)
 SysInfomation.MsComNo = CByte(STR)
 SaveSysInfomation  '保存通信设置
 
 Unload FrmSet
  
End Sub

Private Sub Command2_Click()
 Unload FrmSet
End Sub

Private Sub Form_Load()
Dim STR As String, i As Byte
If Comb(1).ListCount > 0 Then Me.Comb(1).Clear
For i = 1 To 16
    STR = "COM" + CStr(i)
    Me.Comb(1).AddItem STR
Next i
If Comb(0).ListCount > 0 Then Me.Comb(0).Clear
With Me.Comb(0)
    .AddItem "1200"
    .AddItem "2400"
    .AddItem "4800"
    .AddItem "9600"
    .AddItem "19200"
    .AddItem "38400"
    .AddItem "57600"
    .AddItem "115200"
End With
Comb(1).Text = "COM" + CStr(SysInfomation.MsComNo)
i = InStr(1, SysInfomation.MsComString, ",") - 1

STR = Mid(SysInfomation.MsComString, 1, i)

Comb(0).Text = STR
End Sub

Private Sub Form_Unload(Cancel As Integer)
   Frmmain.Enabled = True
End Sub

⌨️ 快捷键说明

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