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

📄 3-1.frm

📁 Visual Basic课程举例1 有很好的例题
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "3-1"
   ClientHeight    =   2880
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3600
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   12
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   2880
   ScaleWidth      =   3600
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "转换成秒数"
      Height          =   375
      Left            =   360
      TabIndex        =   6
      Top             =   1320
      Width           =   2775
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   2280
      TabIndex        =   5
      Top             =   720
      Width           =   735
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1320
      TabIndex        =   4
      Top             =   720
      Width           =   735
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   720
      Width           =   735
   End
   Begin VB.Label Label4 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H80000008&
      Height          =   735
      Left            =   360
      TabIndex        =   7
      Top             =   1800
      Width           =   2775
      WordWrap        =   -1  'True
   End
   Begin VB.Label Label3 
      Caption         =   "秒"
      Height          =   375
      Left            =   2520
      TabIndex        =   3
      Top             =   240
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "分"
      Height          =   255
      Left            =   1560
      TabIndex        =   2
      Top             =   240
      Width           =   375
   End
   Begin VB.Label Label1 
      Caption         =   "小时"
      Height          =   255
      Left            =   480
      TabIndex        =   1
      Top             =   240
      Width           =   735
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    h = Val(Text1)
    m = Val(Text2)
    s = Val(Text3)
    seconds = h * 3600 + m * 60 + s
    Label4.Caption = CStr(h) & "小时" & CStr(m) & "分" & CStr(s) & "秒 = " & CStr(seconds) & "秒"
End Sub

⌨️ 快捷键说明

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