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

📄 form1.frm

📁 四)练习该实验的目的和思路: 程序开始变得复杂起来
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "P65 -3-4"
   ClientHeight    =   3105
   ClientLeft      =   60
   ClientTop       =   435
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3105
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "运     算"
      Height          =   375
      Left            =   960
      TabIndex        =   9
      Top             =   2640
      Width           =   2175
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   2760
      TabIndex        =   7
      Top             =   1560
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1080
      TabIndex        =   0
      Top             =   1560
      Width           =   735
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "Y="
      Height          =   180
      Left            =   2400
      TabIndex        =   8
      Top             =   1680
      Width           =   180
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "X="
      Height          =   180
      Left            =   720
      TabIndex        =   6
      Top             =   1680
      Width           =   180
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "X^2-2    X>0"
      Height          =   180
      Left            =   1800
      TabIndex        =   5
      Top             =   1080
      Width           =   1080
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "X^3+10   X<=0"
      Height          =   180
      Left            =   1800
      TabIndex        =   4
      Top             =   480
      Width           =   1170
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Y ="
      Height          =   180
      Left            =   960
      TabIndex        =   3
      Top             =   840
      Width           =   270
   End
   Begin VB.Label Label3 
      Caption         =   "{"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   42
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   840
      Left            =   960
      TabIndex        =   2
      Top             =   480
      Width           =   840
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "编写程序,计算Y的值。由键盘输入X"
      Height          =   180
      Left            =   600
      TabIndex        =   1
      Top             =   120
      Width           =   2880
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
x = Val(Text1.Text)
If x <= 0 Then y = x ^ 3 + 10
If x > 0 Then y = x ^ 2 - 2
Text2.Text = y
End Sub

⌨️ 快捷键说明

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