VB6.0好用的串口模块类
使用方法如下
//该函数功能将得到的Com口进行从小到大排序写入ComboBox
Public Sub AddComForComBox(comboxcontral As ComboBox)
Dim i As Integer
Dim str2com() As String //COM字符串数组
Dim Serial_No() As String //根据COM后面的数字进行排序
Serial_No = Split(GetSerialPort, ";")
str2com = QuickSort(Serial_No)
For i = 0 To UBound(str2com) - 1
comboxcontral.AddItem Right(str2com(i), Len(str2com(i)) - 3)
Next i
If UBound(str2com) <> 0 Then comboxcontral.ListIndex = 0
End Sub
模块源码如下:
Option Explicit
Public Type SysetDataTable
Parts_ini_rs As Recordset
SerialPort_ini_rs As Recordset
Tester_ini_rs As Recordset
TestItem_ini_rs As Recordset
End Type
Public SysPartsMena As SysPartsMen
Private Type GUID 'GUID数据类型
Data(0 To 3) As Long
End Type
Private Type SP_DEVI版权声明:本文为qq_39537159原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。