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

📄 设置聚焦框.frm

📁 个人VB学习源码精选,自己学习时的一些编程小程序,希望对大家有帮助
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   213
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   312
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Appearance      =   0  'Flat
      Caption         =   "设置聚焦框"
      Height          =   375
      Left            =   1725
      TabIndex        =   1
      Top             =   1980
      Width           =   1230
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "Hello"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   2025
      TabIndex        =   0
      Top             =   630
      Width           =   600
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function DrawFocusRect Lib "user32" (ByVal hdc As Long, lpRect As RECT) As Long
Private Type RECT
    X1 As Long
    Y1 As Long
    X2 As Long
    Y2 As Long
End Type
Dim lpRect As RECT

Private Sub Command1_Click()
    Dim Deng As Long
    lpRect.X1 = Label1.Left - 5
    lpRect.Y1 = Label1.Top - 3
    lpRect.X2 = Label1.Left + Label1.Width + 5
    lpRect.Y2 = Label1.Top + Label1.Height + 3
    Deng = DrawFocusRect(Form1.hdc, lpRect)
    
End Sub



⌨️ 快捷键说明

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