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

📄 frm2lab3.frm

📁 显示时间用的用Visual Basic做的
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm2Lab3 
   Caption         =   "Numbers Of Seconds elapsed  since Window Opened"
   ClientHeight    =   6945
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9825
   LinkTopic       =   "Form1"
   ScaleHeight     =   6945
   ScaleWidth      =   9825
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox Texttime 
      Height          =   615
      Left            =   6840
      TabIndex        =   9
      Text            =   "Text1"
      Top             =   840
      Width           =   1575
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   375
      Left            =   4320
      Max             =   20
      TabIndex        =   8
      Top             =   3120
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Show/Hide frm2Lab3"
      Height          =   855
      Left            =   600
      TabIndex        =   7
      Top             =   4680
      Width           =   2775
   End
   Begin VB.TextBox TxtTime 
      Height          =   615
      Left            =   600
      MaxLength       =   30
      TabIndex        =   3
      Text            =   "Text2"
      Top             =   840
      Width           =   2775
   End
   Begin VB.TextBox TxtDate 
      Height          =   615
      Left            =   600
      MaxLength       =   30
      TabIndex        =   2
      Text            =   "Text1"
      Top             =   2400
      Width           =   2775
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   3840
      Top             =   3720
   End
   Begin VB.TextBox IntervalTime 
      Height          =   855
      Left            =   4320
      TabIndex        =   1
      Text            =   "5000"
      Top             =   1440
      Width           =   1695
   End
   Begin VB.CommandButton Command_Interval 
      Caption         =   "Update Interval Time"
      Height          =   855
      Left            =   4440
      TabIndex        =   0
      Top             =   4200
      Width           =   1815
   End
   Begin VB.Label Label4 
      Caption         =   "Numbers Of Seconds elapsed  since Window Opened"
      BeginProperty Font 
         Name            =   "Arial Unicode MS"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2415
      Left            =   6960
      TabIndex        =   10
      Top             =   1920
      Width           =   1575
   End
   Begin VB.Label Label1 
      Caption         =   "Time"
      BeginProperty Font 
         Name            =   "Arial Black"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1680
      TabIndex        =   6
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "Date"
      BeginProperty Font 
         Name            =   "Arial Unicode MS"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   1680
      TabIndex        =   5
      Top             =   3120
      Width           =   615
   End
   Begin VB.Label Label3 
      Caption         =   "Update Time"
      BeginProperty Font 
         Name            =   "Arial Unicode MS"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   975
      Left            =   4560
      TabIndex        =   4
      Top             =   240
      Width           =   1095
   End
End
Attribute VB_Name = "frm2Lab3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdReport_Click()
TxtTime.Text = TimeVariable
TxtDate.Text = DateVariable
End Sub

Private Sub Command_Interval_Click()
Timer1.Interval = Val(IntervalTime.Text)
HScroll1.Value = Val(IntervalTime.Text) / 1000
intervalshowtime = HScroll1.Value
End Sub

Private Sub Command1_Click()
frm2Lab3.Hide
frmLab3.Show 0
frmLab3.Texttime.Text = 0
intervalshowtime = 1
Timer1.Interval = 1000
End Sub

Private Sub Command2_Click()
End Sub

Private Sub HScroll1_Change()
IntervalTime.Text = HScroll1.Value * 1000
End Sub

Private Sub IntervalTime_Change()
If Val(IntervalTime.Text) > 20000 Then
    IntervalTime.Text = "20000"
ElseIf Val(IntervalTime.Text) < 0 Then
    IntervalTime.Text = "0"
End If
End Sub

Private Sub Timer1_Timer()
frm2Lab3.Texttime.Text = Val(frm2Lab3.Texttime.Text) + Val(intervalshowtime)
GetTimeData
TxtTime.Text = TimeVariable
TxtDate.Text = DateVariable
End Sub

⌨️ 快捷键说明

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