api 延时.frm
来自「Windows API函数,希望大伙有用哦」· FRM 代码 · 共 62 行
FRM
62 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "开 始"
Height = 435
Left = 1680
TabIndex = 0
Top = 2490
Width = 1395
End
Begin VB.Label Label1
AutoSize = -1 'True
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 1590
TabIndex = 1
Top = 1080
Width = 180
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Dim I As Integer
Private Sub Command1_Click()
Me.Caption = "系统延时 10 秒"
I = 10
Print I
Sleep 1000
For I = 9 To 1 Step -1
Print I
Sleep 1000
Next I
Me.Caption = "时间到"
Label1 = "时间到 !"
End Sub
Private Sub Form_Load()
Me.Caption = "单击命令按钮开始"
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?