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

📄 ts_frm.frm

📁 可以读些S7-300PLC中的变量数据
💻 FRM
字号:
VERSION 5.00
Begin VB.Form TS_FRM 
   Caption         =   "TeleService"
   ClientHeight    =   4995
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   4995
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.ComboBox ComboModem 
      Height          =   315
      Left            =   240
      TabIndex        =   15
      Top             =   480
      Width           =   2415
   End
   Begin VB.CommandButton HangUpRing 
      Caption         =   "hang up ring"
      Height          =   375
      Left            =   3120
      TabIndex        =   14
      Top             =   3480
      Width           =   1455
   End
   Begin VB.CommandButton ResetRing 
      Caption         =   "reset ring indicator"
      Height          =   375
      Left            =   3120
      TabIndex        =   13
      Top             =   2880
      Width           =   1455
   End
   Begin VB.CommandButton SetRing 
      Caption         =   "set ring indicator"
      Height          =   375
      Left            =   3120
      TabIndex        =   12
      Top             =   2280
      Width           =   1455
   End
   Begin VB.CommandButton HangUpDial 
      Caption         =   "hang up dial"
      Height          =   375
      Left            =   3120
      TabIndex        =   11
      Top             =   1320
      Width           =   1455
   End
   Begin VB.CommandButton DialSync 
      Caption         =   "dial synchron"
      Height          =   375
      Left            =   3120
      TabIndex        =   10
      Top             =   600
      Width           =   1455
   End
   Begin VB.TextBox IDPASSWORD 
      Height          =   375
      Left            =   240
      TabIndex        =   4
      Text            =   "admin"
      Top             =   3360
      Width           =   2415
   End
   Begin VB.TextBox IDUSERNAME 
      Height          =   375
      Left            =   240
      TabIndex        =   3
      Text            =   "ADMIN"
      Top             =   2640
      Width           =   2415
   End
   Begin VB.TextBox IDTELNO 
      Height          =   375
      Left            =   240
      TabIndex        =   2
      Text            =   "+49 (0171) 2255521"
      Top             =   1920
      Width           =   2415
   End
   Begin VB.TextBox IDSTANDORT 
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Text            =   "Standardstandort"
      Top             =   1200
      Width           =   2415
   End
   Begin VB.CommandButton IDCANCEL 
      Caption         =   "zur點k/cancel"
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   4440
      Width           =   1335
   End
   Begin VB.Label Label5 
      Caption         =   "password"
      Height          =   255
      Left            =   240
      TabIndex        =   9
      Top             =   3120
      Width           =   1575
   End
   Begin VB.Label Label4 
      Caption         =   "username"
      Height          =   255
      Left            =   240
      TabIndex        =   8
      Top             =   2400
      Width           =   1695
   End
   Begin VB.Label Label3 
      Caption         =   "tel. no"
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   1680
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "standort"
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   960
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "modem name"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   240
      Width           =   1095
   End
End
Attribute VB_Name = "TS_FRM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub DialSync_Click()
ModemName = ComboModem.Text
Standort = IDSTANDORT.Text
TelNo = IDTELNO.Text
UserName = IDUSERNAME.Text
Password = IDPASSWORD.Text

res = ts_dial(ModemName, Standort, TelNo, UserName, Password, 0, 0, 0, 0)

If (res <> 0) Then
   ERROR_FRM.Show 1, Me
End If

End Sub


Private Sub Form_Activate()
Dim i As Long

IDSTANDORT.Text = Standort
IDTELNO.Text = TelNo
IDUSERNAME.Text = UserName
IDPASSWORD.Text = Password

ComboModem.Clear
res = 0
i = 0
While res = 0
   ModemNameLen = 80
   ModemName = "                                                                                          "
   res = ts_get_modem_name(i, ModemName, ModemNameLen)
   If res = 0 Then ComboModem.AddItem ModemName ' Add the entry.
   i = i + 1
Wend
If (i > 1) Or (i = 1) And (res = 0) Then ComboModem.ListIndex = 0
End Sub


Private Sub HangUpDial_Click()
res = ts_hang_up_dial()

If (res <> 0) Then
   ERROR_FRM.Show 1, Me
End If

End Sub

Private Sub HangUpRing_Click()
res = ts_hang_up_ring()

If (res <> 0) Then
   ERROR_FRM.Show 1, Me
End If

End Sub

Private Sub IDCANCEL_Click()
TS_FRM.Visible = False
End Sub

Private Sub ResetRing_Click()
Dim dummy As String
dummy = ""
res = ts_set_ringindicator(dummy, 0, 0, 0, 0, 0)
'flag for timer not to call ts_read_info
RingActive = 0
If (res <> 0) Then
   ERROR_FRM.Show 1, Me
End If

End Sub

Private Sub SetRing_Click()
ModemName = ComboModem.Text
Standort = IDSTANDORT.Text
TelNo = IDTELNO.Text
UserName = IDUSERNAME.Text
Password = IDPASSWORD.Text

res = ts_set_ringindicator(ModemName, 0, 0, 0, 0, 0)
'flag for timer to call ts_read_info
RingActive = 1

If (res <> 0) Then
   ERROR_FRM.Show 1, Me
End If

End Sub

⌨️ 快捷键说明

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