限制鼠标移动1.frm

来自「Windows API函数,希望大伙有用哦」· FRM 代码 · 共 55 行

FRM
55
字号
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00FFFF80&
   Caption         =   "Form1"
   ClientHeight    =   3360
   ClientLeft      =   570
   ClientTop       =   705
   ClientWidth     =   5865
   LinkTopic       =   "Form2"
   ScaleHeight     =   224
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   391
   Begin VB.CommandButton Command1 
      Caption         =   "退   出"
      Height          =   375
      Left            =   4440
      TabIndex        =   0
      Top             =   2760
      Width           =   1095
   End
   Begin VB.Timer Timer2 
      Interval        =   3000
      Left            =   2880
      Top             =   1200
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   1830
      Top             =   1200
   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 Sub Form_Load()
    Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
    Timer1.Enabled = False
    Timer2.Enabled = True
    Form2.Show
End Sub
Private Sub Timer2_Timer()
    Timer2.Enabled = False
    ClipCursor ByVal 0&
    Unload Form2
End Sub
Private Sub Command1_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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