📄 frmdigupload.frm
字号:
VERSION 5.00
Begin VB.Form frmdigupload
Caption = "上传数据至PC"
ClientHeight = 3900
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3900
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox txttime
Height = 495
Left = 1920
TabIndex = 10
Text = "1000"
Top = 1680
Width = 735
End
Begin VB.TextBox txtsend
Height = 495
Left = 4080
TabIndex = 7
Text = "1"
Top = 120
Width = 495
End
Begin VB.TextBox Text2
Height = 495
Left = 1920
TabIndex = 3
Top = 960
Width = 2415
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 840
TabIndex = 2
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "传输"
Height = 375
Left = 2280
TabIndex = 1
Top = 3240
Width = 1095
End
Begin VB.TextBox txtreceive
Height = 495
Left = 1680
TabIndex = 0
Text = "0"
Top = 120
Width = 495
End
Begin VB.Label Label5
Caption = "请输入延时"
Height = 375
Left = 240
TabIndex = 9
Top = 1800
Width = 1455
End
Begin VB.Label Labrec
Caption = "1"
Height = 735
Left = 1080
TabIndex = 8
Top = 2520
Width = 3135
End
Begin VB.Label Label3
Caption = "输入发送管道号"
Height = 255
Left = 2400
TabIndex = 6
Top = 240
Width = 1455
End
Begin VB.Label Label2
Caption = "输入要发送的数据"
Height = 255
Left = 240
TabIndex = 5
Top = 1080
Width = 1575
End
Begin VB.Label Label1
Caption = "输入接受管道号"
Height = 255
Left = 240
TabIndex = 4
Top = 240
Width = 1335
End
End
Attribute VB_Name = "frmdigupload"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function readdate214x Lib "D:\vb\easyusb214x.dll" (ByVal a As Long, ByVal b As String, ByVal c As Long, ByVal wai As Long) As Long
Private Declare Function writedate214x Lib "D:\vb\easyusb214x.dll" (ByVal a As Long, ByVal b As String, ByVal c As Long, ByVal wai As Long) As Long
Private Sub Command1_Click()
Dim pns1 As Integer
Dim ps1 As Integer
ps1 = Val(txtsend.Text)
If (ps1 <> 1) & (ps1 <> 3) & (ps1 <> 4) & (ps1 <> 5) & (ps1 <> 7) & (ps1 <> 11) & (ps1 <> 13) Then
MsgBox ("管道号错误,它只能是1,3,5,7,9,11,13")
Else
pns1 = ps1
End If
Dim sendbuff() As String '定义数组的X
sendbuff = Split(Text2.Text, ",") '给X赋值
Dim l As Integer
l = UBound(sendbuff)
Dim t1 As Integer
t1 = Val(txttime.Text)
Dim pns2 As Integer
Dim ps2 As Integer
ps2 = Val(txtreceive.Text)
If (ps1 <> 0) & (ps1 <> 2) & (ps1 <> 4) & (ps1 <> 6) & (ps1 <> 8) & (ps1 <> 10) & (ps1 <> 12) Then
MsgBox ("管道号错误,它只能是2,4,6,8,10,12,0")
Else
pns2 = ps2
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -