📄 test6110.frm
字号:
VERSION 5.00
Object = "{4FB3AAE2-6124-11D6-9719-444553540000}#1.0#0"; "SMSNOKIA.OCX"
Begin VB.Form 测试6110
Caption = "Form1"
ClientHeight = 7290
ClientLeft = 5370
ClientTop = 2490
ClientWidth = 6105
LinkTopic = "Form1"
ScaleHeight = 731.296
ScaleMode = 0 'User
ScaleWidth = 2099.094
Begin VB.CommandButton Command3
Caption = "GetMessage"
Height = 375
Left = 3960
TabIndex = 16
Top = 960
Width = 1095
End
Begin VB.TextBox recCenter
Height = 375
Left = 1440
TabIndex = 15
Top = 6240
Width = 2175
End
Begin SMSNOKIALib.Smsnokia Smsnokia1
Height = 255
Left = 3000
TabIndex = 14
Top = 120
Width = 495
_Version = 65536
_ExtentX = 873
_ExtentY = 450
_StockProps = 0
End
Begin VB.TextBox recTime
Height = 405
Left = 1440
TabIndex = 13
Top = 5640
Width = 2175
End
Begin VB.TextBox recText
Height = 885
Left = 1440
TabIndex = 12
Top = 4560
Width = 3015
End
Begin VB.TextBox recPhone
Height = 375
Left = 1440
TabIndex = 11
Top = 4080
Width = 2175
End
Begin VB.TextBox EvtID
Height = 405
Left = 1080
TabIndex = 10
Top = 3360
Width = 1215
End
Begin VB.CommandButton SendButton
Caption = "SendMsg"
Height = 375
Left = 2640
TabIndex = 8
Top = 960
Width = 1095
End
Begin VB.TextBox Msg
Height = 1575
Left = 1080
TabIndex = 7
Top = 1680
Width = 4095
End
Begin VB.TextBox Phone
Height = 405
Left = 1080
TabIndex = 5
Top = 1200
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "CloseDevice"
Height = 375
Left = 3960
TabIndex = 3
Top = 480
Width = 1095
End
Begin VB.TextBox Port
Height = 375
Left = 1080
TabIndex = 1
Top = 480
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "InitDevice"
Height = 375
Left = 2640
TabIndex = 0
Top = 480
Width = 1095
End
Begin VB.Line Line4
X1 = 247.559
X2 = 1650.394
Y1 = 686.154
Y2 = 686.154
End
Begin VB.Line Line3
X1 = 1650.394
X2 = 1650.394
Y1 = 385.209
Y2 = 686.154
End
Begin VB.Line Line2
X1 = 247.559
X2 = 1650.394
Y1 = 385.209
Y2 = 385.209
End
Begin VB.Line Line1
X1 = 247.559
X2 = 247.559
Y1 = 385.209
Y2 = 686.154
End
Begin VB.Label Label4
Caption = "Event"
Height = 255
Left = 360
TabIndex = 9
Top = 3360
Width = 495
End
Begin VB.Label Label3
Caption = "Msg"
Height = 375
Left = 360
TabIndex = 6
Top = 2160
Width = 495
End
Begin VB.Label Label2
Caption = "Phone"
Height = 255
Left = 360
TabIndex = 4
Top = 1200
Width = 615
End
Begin VB.Label Label1
Caption = "COMx"
Height = 375
Left = 360
TabIndex = 2
Top = 600
Width = 615
End
End
Attribute VB_Name = "测试6110"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim ret
ret = Smsnokia1.InitDevice(Port, 15200, 0)
If ret = 0 Then
MsgBox ("init Ok!")
Else
MsgBox ("init Err!")
End If
End Sub
Private Sub Command2_Click()
Dim ret
ret = Smsnokia1.CloseDevice()
If ret = 0 Then
MsgBox ("Close Ok!")
Else
MsgBox ("Close Err!")
End If
End Sub
Private Sub Command3_Click()
Dim n
For n = 1 To 25
Smsnokia1.GetMsg (n)
Next n
End Sub
Private Sub Form_Load()
Port = 1
End Sub
Private Sub SendButton_Click()
Dim ret
ret = Smsnokia1.SendMsg(Phone, Msg)
If ret = 0 Then
MsgBox ("Send Ok!")
Else
MsgBox ("Send Err!")
End If
End Sub
Private Sub Smsnokia1_SmsEvent(ByVal nID As Integer, ByVal szPhone As String, ByVal szText As String, ByVal szTime As String, ByVal szCenter As String)
EvtID = nID
If nID = 2 Then
recPhone = szPhone
recText = szText
recTime = szTime
recCenter = szCenter
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -