practice5_3.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 140 行
FRM
140 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 3000
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 3000
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "计算"
Height = 495
Left = 1080
TabIndex = 6
Top = 2400
Width = 1215
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
Locked = -1 'True
TabIndex = 4
Top = 1680
Width = 1215
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 1
Top = 960
Width = 1215
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 0
Top = 240
Width = 1215
End
Begin VB.Label Label3
Caption = "y="
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 480
TabIndex = 5
Top = 1800
Width = 255
End
Begin VB.Label Label2
Caption = "b="
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 480
TabIndex = 3
Top = 1080
Width = 255
End
Begin VB.Label Label1
Caption = "a="
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 480
TabIndex = 2
Top = 480
Width = 255
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()
a = Val(Text1.Text)
b = Val(Text2.Text)
If a > 0 Then
If b > 0 Then
y = Log(a) + Log(b)
Else
y = Sin(a) + Sin(b)
End If
Else
y = Sin(a) + Cos(b)
End If
Text3.Text = Format(y, "0.000")
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?