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

📄 form1.frm

📁 小学生加减法的算术练习程序 小学生可以用它检测自己的学习效果
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   8025
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   9105
   LinkTopic       =   "Form1"
   ScaleHeight     =   8025
   ScaleWidth      =   9105
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command8 
      Caption         =   "清除前的题目"
      Height          =   615
      Left            =   3960
      TabIndex        =   19
      Top             =   4200
      Visible         =   0   'False
      Width           =   1455
   End
   Begin MCI.MMControl MMControl1 
      Height          =   615
      Left            =   5520
      TabIndex        =   18
      Top             =   3360
      Visible         =   0   'False
      Width           =   3540
      _ExtentX        =   6244
      _ExtentY        =   1085
      _Version        =   393216
      DeviceType      =   ""
      FileName        =   ""
   End
   Begin VB.CommandButton Command7 
      Caption         =   "正确率"
      Height          =   615
      Left            =   3960
      TabIndex        =   17
      Top             =   3360
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.CommandButton Command6 
      Caption         =   "下一题"
      Height          =   615
      Left            =   3960
      TabIndex        =   16
      Top             =   5040
      Visible         =   0   'False
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "+"
      Height          =   615
      Index           =   0
      Left            =   120
      TabIndex        =   15
      Top             =   2400
      Width           =   615
   End
   Begin VB.CommandButton Command1 
      Caption         =   "-"
      Height          =   615
      Index           =   1
      Left            =   1080
      TabIndex        =   14
      Top             =   2400
      Width           =   615
   End
   Begin VB.CommandButton Command1 
      Caption         =   "×"
      Height          =   615
      Index           =   2
      Left            =   120
      TabIndex        =   13
      Top             =   3240
      Width           =   615
   End
   Begin VB.CommandButton Command1 
      Caption         =   "÷"
      Height          =   615
      Index           =   3
      Left            =   1080
      TabIndex        =   12
      Top             =   3240
      Width           =   615
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   3000
      Top             =   2040
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   420
      Left            =   0
      TabIndex        =   11
      Top             =   0
      Width           =   9105
      _ExtentX        =   16060
      _ExtentY        =   741
      ButtonWidth     =   609
      ButtonHeight    =   582
      Appearance      =   1
      ImageList       =   "imlToolbarIcons(0)"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   4
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "粗体"
            Object.ToolTipText     =   "粗体"
            ImageKey        =   "Bold"
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "下划线"
            Object.ToolTipText     =   "下划线"
            ImageKey        =   "Underline"
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Key             =   "斜体"
            Object.ToolTipText     =   "斜体"
            ImageKey        =   "Italic"
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
         EndProperty
      EndProperty
   End
   Begin VB.TextBox Text7 
      Height          =   270
      Left            =   5040
      TabIndex        =   10
      Text            =   "    ="
      Top             =   1320
      Width           =   975
   End
   Begin VB.TextBox Text6 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   4680
      TabIndex        =   9
      Text            =   "正确的结果是:"
      Top             =   2160
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.TextBox Text5 
      Height          =   615
      Left            =   6600
      TabIndex        =   8
      Top             =   2160
      Visible         =   0   'False
      Width           =   1335
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   2160
      TabIndex        =   7
      Top             =   1200
      Width           =   495
   End
   Begin VB.CommandButton Command5 
      Caption         =   "显示结果"
      Height          =   615
      Left            =   1920
      TabIndex        =   6
      Top             =   5040
      Width           =   1455
   End
   Begin VB.TextBox Text3 
      Height          =   615
      Left            =   6480
      TabIndex        =   5
      Top             =   1080
      Width           =   1335
   End
   Begin VB.CommandButton Command4 
      Caption         =   "判断结果"
      Height          =   615
      Left            =   0
      TabIndex        =   4
      Top             =   5040
      Width           =   1455
   End
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   615
      Left            =   0
      TabIndex        =   3
      Top             =   4200
      Width           =   1455
   End
   Begin VB.CommandButton Command2 
      Caption         =   "清除"
      Height          =   615
      Left            =   1920
      TabIndex        =   2
      Top             =   4200
      Width           =   1455
   End
   Begin VB.TextBox Text2 
      Height          =   615
      Left            =   3240
      TabIndex        =   1
      Top             =   1080
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      Height          =   615
      Left            =   480
      TabIndex        =   0
      Top             =   1080
      Width           =   1335
   End
   Begin MSComctlLib.ImageList imlToolbarIcons 
      Index           =   0
      Left            =   2160
      Top             =   1920
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":0000
            Key             =   "save"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":0112
            Key             =   "Underline"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Form1.frx":0224
            Key             =   "Italic"
         EndProperty
      EndProperty
   End
   Begin VB.Label Label5 
      Height          =   375
      Left            =   3120
      TabIndex        =   24
      Top             =   3480
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.Label Label4 
      Height          =   375
      Left            =   2040
      TabIndex        =   23
      Top             =   3480
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.Label Label3 
      Height          =   375
      Left            =   3000
      TabIndex        =   22
      Top             =   2760
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.Label Label2 
      Height          =   375
      Left            =   2040
      TabIndex        =   21
      Top             =   2760
      Visible         =   0   'False
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   15
      Left            =   8760
      TabIndex        =   20
      Top             =   5880
      Width           =   15
   End
   Begin VB.Menu size 
      Caption         =   "风格&S"
      Begin VB.Menu S1 
         Caption         =   "手动"
      End
      Begin VB.Menu S2 
         Caption         =   "自动"
      End
   End
   Begin VB.Menu color 
      Caption         =   "界面选择&C"
      Begin VB.Menu one 
         Caption         =   "界面1"
      End
      Begin VB.Menu two 
         Caption         =   "界面2"
      End
      Begin VB.Menu three 
         Caption         =   "界面3"
      End
   End
   Begin VB.Menu music 
      Caption         =   "音乐 (&M)"
      Begin VB.Menu m1 
         Caption         =   "音乐1"
      End
      Begin VB.Menu m2 
         Caption         =   "音乐2"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a As Integer, b As Integer, c As Integer, d As Integer
Private Sub Command6_Click()
Command4.Enabled = True
Command4.Caption = "判断结果"
Command7.Caption = "正确率"
Command7.Visible = False
Command4.Caption = "判断结果"
Text5.Visible = False
Text6.Visible = False
Text3.Text = ""
Randomize Time
Text1.Text = Int((b - a + 1) * Rnd + a)
Text2.Text = Int((b - a + 1) * Rnd + a)
If Text4.Text = "+" Then Text5.Text = Val(Text1.Text) + Val(Text2.Text)
If Text4.Text = "-" Then Text5.Text = Val(Text1.Text) - Val(Text2.Text)
If Text4.Text = "×" Then Text5.Text = Val(Text1.Text) * Val(Text2.Text)
If Text4.Text = "÷" Then
If Val(Text2.Text) = 0 Then
MsgBox "除法错误!", vbCritical, "出错"
Else
Text5.Text = Val(Text1.Text) / Val(Text2.Text)
Text5.Text = Format(Text5.Text, "0.00")
End If
End If
Label2.Caption = Text1.Text
Label3.Caption = Text2.Text
Label4.Caption = Text4.Text
Label5.Caption = Text5.Text
End Sub
Private Sub Command7_Click()
Command7.Visible = True
Command7.Caption = (c / d) * 100
Command7.Caption = Format(Command7.Caption, "0.00")
Command7.Caption = "正确率是:" & Str(Command7.Caption) & "%"
End Sub

Private Sub Command8_Click()
Command4.Enabled = False
If Label2.Caption <> "" Then
Text1.Text = Label2.Caption
Text2.Text = Label3.Caption
Text4.Text = Label4.Caption
Text5.Text = Label5.Caption
Text3.Text = Text5.Text
Else
MsgBox "你还没做题", 17, "出错"
End If
End Sub
Private Sub Form_DblClick()
Command6.Visible = True
End Sub

Private Sub Form_Load()
Form1.Picture = LoadPicture("d.jpg")
MMControl1.Visible = False
MMControl1.Command = "close"
MMControl1.FileName = "神秘园之歌.mp3"
MMControl1.Command = "open"
MMControl1.Command = "play"
End Sub


Private Sub m1_Click()
MMControl1.Visible = False
MMControl1.Command = "close"
MMControl1.FileName = "kiss The Rain.mp3"
MMControl1.Command = "open"
MMControl1.Command = "play"
End Sub

Private Sub m2_Click()
MMControl1.Visible = False
MMControl1.Command = "close"
MMControl1.FileName = "more than love.mp3"
MMControl1.Command = "open"
MMControl1.Command = "play"
End Sub

Private Sub S1_Click()
Command6.Visible = False
End Sub

Private Sub S2_Click()
Command4.Enabled = True
Command8.Visible = False
Command7.Visible = False
Command7.Caption = "正确率"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Command4.Caption = "判断结果"
Command6.Visible = True
Text5.Visible = False
Text6.Visible = False
a = Val(InputBox("请输入下界:", "输入自动取数范围"))
b = Val(InputBox("请输入上界:", "输入自动取数范围"))
Randomize Time
Text1.Text = Int((b - a + 1) * Rnd + a)
Text2.Text = Int((b - a + 1) * Rnd + a)
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComCtlLib.Button)
    Select Case Button.Index
        Case 1
          Text6.FontBold = Button.Value
        Case 2
        Text6.FontUnderline = Button.Value
        Case 3
           Text6.FontItalic = Button.Value
           Case 4
             CommonDialog1.Action = 3
             Text6.BackColor = CommonDialog1.color
    End Select
End Sub
Private Sub Command1_Click(Index As Integer)
Text4.Text = Command1(Index).Caption
Select Case Index
Case 0
Text5.Text = Val(Text1.Text) + Val(Text2.Text)
Case 1
Text5.Text = Val(Text1.Text) - Val(Text2.Text)
Case 2
Text5.Text = Val(Text1.Text) * Val(Text2.Text)
Case 3
If Val(Text2.Text) = 0 Then
MsgBox "除法错误!", vbCritical, "出错"
Else
Text5.Text = Val(Text1.Text) / Val(Text2.Text)
Text5.Text = Format(Text5.Text, "0.00")
End If
End Select
Command4.Enabled = True
Command8.Visible = False
Label2.Caption = Text1.Text
Label3.Caption = Text2.Text
Label4.Caption = Text4.Text
Label5.Caption = Text5.Text
End Sub
Private Sub Command2_Click()
Command7.Caption = "正确率"
Text1.Text = "": Text2.Text = "": Text3.Text = ""
Text4.Text = "": Text5.Text = ""
Command4.Caption = "判断结果"
Text5.Visible = False
Text6.Visible = False
Command6.Visible = False
Command7.Visible = False
Command8.Visible = True
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Command4_Click()
Command7.Visible = True
If Text3.Text <> "" Then
d = d + 1
If Text3.Text = Text5.Text Then
Command4.Caption = "正确"
c = c + 1
If c = 2 Then
MsgBox "恭喜你答对了2题", 0, "Yeah"
End If
Else
Command4.Caption = "错误"
End If
Else
MsgBox "请输入结果后重试", 17, "出错"
Command7.Visible = False
End If
End Sub

Private Sub Command5_Click()
Text5.Visible = True
Text6.Visible = True
End Sub
Private Sub one_Click()
Form1.Picture = LoadPicture("a.jpg")
End Sub


Private Sub three_Click()
Form1.Picture = LoadPicture("c.jpg")
End Sub
Private Sub two_Click()
Form1.Picture = LoadPicture("b.jpg")
End Sub

⌨️ 快捷键说明

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