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

📄 form2.frm

📁 visual basic课程设计案例精编
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "设置"
   ClientHeight    =   5760
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6225
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5760
   ScaleWidth      =   6225
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame2 
      Caption         =   "显示模式"
      Height          =   1935
      Left            =   2880
      TabIndex        =   13
      Top             =   840
      Width           =   2895
      Begin VB.OptionButton Option9 
         Caption         =   "垂直下掉"
         Height          =   255
         Left            =   240
         TabIndex        =   20
         Top             =   480
         Value           =   -1  'True
         Width           =   1215
      End
      Begin VB.OptionButton Option10 
         Caption         =   "向右喷出"
         Height          =   255
         Left            =   1440
         TabIndex        =   19
         Top             =   480
         Width           =   1215
      End
      Begin VB.OptionButton Option11 
         Caption         =   "向左喷出"
         Height          =   255
         Left            =   240
         TabIndex        =   18
         Top             =   840
         Width           =   1215
      End
      Begin VB.OptionButton Option12 
         Caption         =   "锯齿形"
         Height          =   255
         Left            =   1440
         TabIndex        =   17
         Top             =   840
         Width           =   1215
      End
      Begin VB.OptionButton Option13 
         Caption         =   "树形"
         Height          =   255
         Left            =   240
         TabIndex        =   16
         Top             =   1200
         Width           =   1215
      End
      Begin VB.OptionButton Option14 
         Caption         =   "淋浴式"
         Height          =   255
         Left            =   1440
         TabIndex        =   15
         Top             =   1200
         Width           =   1215
      End
      Begin VB.OptionButton Option15 
         Caption         =   "火山爆发"
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   1560
         Width           =   1215
      End
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   3720
      TabIndex        =   12
      Top             =   4320
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Ok"
      Height          =   375
      Left            =   840
      TabIndex        =   11
      Top             =   4320
      Width           =   975
   End
   Begin VB.ComboBox Combo1 
      Height          =   315
      ItemData        =   "Form2.frx":0000
      Left            =   3600
      List            =   "Form2.frx":0002
      Sorted          =   -1  'True
      Style           =   2  'Dropdown List
      TabIndex        =   9
      Top             =   3480
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Caption         =   "颜色"
      Height          =   3375
      Left            =   480
      TabIndex        =   0
      Top             =   600
      Width           =   1815
      Begin VB.OptionButton Option8 
         Caption         =   "随机"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   3000
         Width           =   855
      End
      Begin VB.OptionButton Option7 
         Caption         =   "洋红色"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   2640
         Width           =   855
      End
      Begin VB.OptionButton Option6 
         Caption         =   "黄色"
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   2280
         Width           =   855
      End
      Begin VB.OptionButton Option5 
         Caption         =   "红色"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   1920
         Width           =   855
      End
      Begin VB.OptionButton Option4 
         Caption         =   "青色"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   1560
         Width           =   855
      End
      Begin VB.OptionButton Option3 
         Caption         =   "绿色"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   1200
         Width           =   855
      End
      Begin VB.OptionButton Option2 
         Caption         =   "蓝色"
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   840
         Width           =   855
      End
      Begin VB.OptionButton Option1 
         Caption         =   "白色"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   480
         Value           =   -1  'True
         Width           =   855
      End
   End
   Begin VB.Label Label1 
      Caption         =   "出现风格"
      Height          =   255
      Left            =   3600
      TabIndex        =   10
      Top             =   3120
      Width           =   1215
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit '强制变量声明

Private Sub Command1_Click()
    If Option1.Value = True Then
        SaveSetting "saver", "setup", "Color", "1"
    ElseIf Option2.Value = True Then
        SaveSetting "saver", "setup", "Color", "2"
    ElseIf Option3.Value = True Then
        SaveSetting "saver", "setup", "Color", "3"
    ElseIf Option4.Value = True Then
        SaveSetting "saver", "setup", "Color", "4"
    ElseIf Option5.Value = True Then
        SaveSetting "saver", "setup", "Color", "5"
    ElseIf Option6.Value = True Then
        SaveSetting "saver", "setup", "Color", "6"
    ElseIf Option7.Value = True Then
        SaveSetting "saver", "setup", "Color", "7"
    ElseIf Option8.Value = True Then
        SaveSetting "saver", "setup", "Color", "8"
    End If
    If Option9.Value = True Then
        SaveSetting "saver", "setup", "Performance", "1"
    ElseIf Option10.Value = True Then
        SaveSetting "saver", "setup", "Performance", "2"
    ElseIf Option11.Value = True Then
        SaveSetting "saver", "setup", "Performance", "3"
    ElseIf Option12.Value = True Then
        SaveSetting "saver", "setup", "Performance", "4"
    ElseIf Option13.Value = True Then
        SaveSetting "saver", "setup", "Performance", "5"
    ElseIf Option14.Value = True Then
        SaveSetting "saver", "setup", "Performance", "6"
    ElseIf Option15.Value = True Then
        SaveSetting "saver", "setup", "Performance", "7"
    End If
    SaveSetting "saver", "setup", "Mode", Str(Combo1.ListIndex)
    End
End Sub

Private Sub Command2_Click()
    End
End Sub

Private Sub Form_Load()
    Combo1.AddItem "鼠标控制", 0
    Combo1.AddItem "随机出现", 1
    Combo1.AddItem "在顶部随机出现", 2
    Combo1.AddItem "跟随鼠标", 3
    Combo1.AddItem "画圆", 4
    If GetSetting("saver", "setup", "Color", "") = "" Then
        Color = 8
        Option8.Value = True
    Else
        Color = Val(GetSetting("saver", "setup", "Color", ""))
        Select Case Color
        Case 1
            Option1.Value = True
        Case 2
            Option2.Value = True
        Case 3
            Option3.Value = True
        Case 4
            Option4.Value = True
        Case 5
            Option5.Value = True
        Case 6
            Option6.Value = True
        Case 7
            Option7.Value = True
        Case 8
            Option8.Value = True
        End Select
    End If
    If GetSetting("saver", "setup", "Performance", "") = "" Then
        Performance = 1
        Option9.Value = True
    Else
        Performance = Val(GetSetting("saver", "setup", "Performance", ""))
        Select Case Performance
        Case 1
            Option9.Value = True
        Case 2
            Option10.Value = True
        Case 3
            Option11.Value = True
        Case 4
            Option12.Value = True
        Case 5
            Option13.Value = True
        Case 6
            Option14.Value = True
        Case 7
            Option15.Value = True
        End Select
    End If
    If GetSetting("saver", "setup", "Mode", "") = "" Then
        Mode = 0
    Else
        Mode = Val(GetSetting("saver", "setup", "Mode", ""))
    End If
    Combo1.ListIndex = Mode
End Sub

⌨️ 快捷键说明

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