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

📄 frmitemupdateinterval.frm

📁 opc 通讯 册测试通讯OPC使用 客户端/服务端
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmItemUpdateInterval 
   Caption         =   "数据项更新间隔时间设置"
   ClientHeight    =   1290
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3360
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   ScaleHeight     =   1290
   ScaleWidth      =   3360
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Ok 
      Caption         =   "Ok"
      Height          =   375
      Left            =   990
      TabIndex        =   2
      ToolTipText     =   "Hit Ok to accept the new update interval"
      Top             =   810
      Width           =   1215
   End
   Begin VB.TextBox Interval 
      Height          =   285
      Left            =   1440
      MaxLength       =   5
      TabIndex        =   1
      Text            =   "50"
      ToolTipText     =   "Enter the update interval for the display of data (50 - 10000) ms."
      Top             =   300
      Width           =   1815
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "更新间隔(ms):"
      Height          =   180
      Left            =   210
      TabIndex        =   0
      Top             =   360
      Width           =   1170
   End
End
Attribute VB_Name = "frmItemUpdateInterval"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit
Option Base 1

Private Sub Form_Load()
    Interval.Text = Mid(Str(fMainForm.Timer1.Interval), 2)
End Sub

Private Sub Ok_Click()
    Dim IntVal As Long
    IntVal = Val(Interval.Text)
    If IntVal < 50 Then
        IntVal = 50
    ElseIf IntVal > 10000 Then
        IntVal = 10000
    End If
    Interval.Text = Mid(Str(IntVal), 2)
    fMainForm.Timer1.Enabled = False
    fMainForm.Timer1.Interval = IntVal
    fMainForm.Timer1.Enabled = True
Unload Me
End Sub

Private Sub Form_Deactivate()
    frmItemUpdateInterval.Show
End Sub

⌨️ 快捷键说明

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