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

📄 form1.frm

📁 一个简单的VB界面处理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3810
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7005
   LinkTopic       =   "Form1"
   ScaleHeight     =   3810
   ScaleWidth      =   7005
   StartUpPosition =   3  '窗口缺省
   Begin VB.Line Line4 
      X1              =   480
      X2              =   2400
      Y1              =   1320
      Y2              =   1320
   End
   Begin VB.Line Line3 
      X1              =   2400
      X2              =   2400
      Y1              =   480
      Y2              =   1320
   End
   Begin VB.Line Line2 
      X1              =   480
      X2              =   480
      Y1              =   480
      Y2              =   1320
   End
   Begin VB.Line Line1 
      X1              =   480
      X2              =   2400
      Y1              =   480
      Y2              =   480
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   615
      Left            =   600
      TabIndex        =   0
      Top             =   600
      Width           =   1695
   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()

'初始Form与Label

Form1.Caption = "浮动按钮"

Form1.KeyPreview = False

Label1.Caption = "确定"

'初始4条Line的显示属性为False

Line1.Visible = False

Line2.Visible = False

Line3.Visible = False

Line4.Visible = False

'初始4条Line的颜色

Line1.BorderColor = &HE0E0E0

Line2.BorderColor = &HE0E0E0

Line3.BorderColor = &H808080

Line4.BorderColor = &H808080

End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

'鼠标指针在窗体上(不在按钮上)时,置4条Line的显示属性为False

Line1.Visible = False

Line2.Visible = False

Line3.Visible = False

Line4.Visible = False

End Sub

Private Sub label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

'鼠标指针在按钮上时,置4条Line的显示属性为True

Line1.Visible = True

Line2.Visible = True

Line3.Visible = True

Line4.Visible = True

End Sub

⌨️ 快捷键说明

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