practice4_3.frm

来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 92 行

FRM
92
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "求三角函数的绝对值"
   ClientHeight    =   2820
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3765
   LinkTopic       =   "Form1"
   ScaleHeight     =   2820
   ScaleWidth      =   3765
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text2 
      Height          =   1575
      Left            =   360
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   3
      Top             =   960
      Width           =   3135
   End
   Begin VB.CommandButton Command1 
      Caption         =   "计算"
      Height          =   375
      Left            =   2520
      TabIndex        =   2
      Top             =   120
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1200
      TabIndex        =   1
      Top             =   120
      Width           =   1095
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "|cosX|"
      Height          =   180
      Left            =   2520
      TabIndex        =   6
      Top             =   720
      Width           =   540
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "|sinX|"
      Height          =   180
      Left            =   1440
      TabIndex        =   5
      Top             =   720
      Width           =   540
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "X"
      Height          =   180
      Left            =   600
      TabIndex        =   4
      Top             =   720
      Width           =   90
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "请输入X:"
      Height          =   180
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   720
   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)
   X1 = X * 3.1416 / 180
   SX = Abs(Sin(X1))
   CX = Abs(Cos(X1))
   Text2.Text = Text2.Text & _
              Format(X, "0.000") & "      " & _
              Format(SX, "0.000") & "       " & _
              Format(CX, "0.000") & Chr(13) & Chr(10)
   Text1.SetFocus
   Text1.SelStart = 0
   Text1.SelLength = Len(Text1.Text)
End Sub

⌨️ 快捷键说明

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