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

📄 config.frm

📁 一个漂亮的按钮
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmConfig 
   Caption         =   "自制屏保--设置"
   ClientHeight    =   2670
   ClientLeft      =   3555
   ClientTop       =   2850
   ClientWidth     =   3300
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   2670
   ScaleWidth      =   3300
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox txtNumBalls 
      Height          =   405
      Left            =   1920
      TabIndex        =   0
      Top             =   1440
      Width           =   1095
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2040
      TabIndex        =   2
      Top             =   2040
      Width           =   1095
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   120
      TabIndex        =   1
      Top             =   2040
      Width           =   1095
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "输入小球的数量:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   195
      Left            =   120
      TabIndex        =   3
      Top             =   1560
      Width           =   1695
   End
End
Attribute VB_Name = "frmConfig"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
    
    Unload Me
End Sub


'按下确定按钮时,保存设置
Private Sub cmdOk_Click()
    
    On Error Resume Next
    
    'CInt函数 强制取整
    NumBalls = CInt(txtNumBalls)
    On Error GoTo 0

    '保存设置
    SaveConfig

    '卸载窗体
    Unload Me
End Sub

'窗体加载时
Private Sub Form_Load()
    
    '取得已有设置
    LoadConfig
    
    '显示在输入框中
    txtNumBalls = Format$(NumBalls)
End Sub

⌨️ 快捷键说明

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