practice4_6.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 156 行
FRM
156 行
VERSION 5.00
Begin VB.Form Form1
Caption = "求方程的解"
ClientHeight = 2490
ClientLeft = 45
ClientTop = 345
ClientWidth = 3315
LinkTopic = "Form1"
ScaleHeight = 2490
ScaleWidth = 3315
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "求解"
Height = 372
Left = 240
TabIndex = 11
Top = 1920
Width = 1092
End
Begin VB.TextBox C2
Alignment = 2 'Center
Height = 372
Left = 2400
TabIndex = 5
Top = 960
Width = 612
End
Begin VB.TextBox B2
Alignment = 2 'Center
Height = 372
Left = 1320
TabIndex = 4
Top = 960
Width = 612
End
Begin VB.TextBox A2
Alignment = 2 'Center
Height = 372
Left = 240
TabIndex = 3
Top = 960
Width = 612
End
Begin VB.TextBox C1
Alignment = 2 'Center
Height = 372
Left = 2400
TabIndex = 2
Top = 240
Width = 612
End
Begin VB.TextBox B1
Alignment = 2 'Center
Height = 372
Left = 1320
TabIndex = 1
Top = 240
Width = 612
End
Begin VB.TextBox A1
Alignment = 2 'Center
Height = 372
Left = 240
TabIndex = 0
Top = 240
Width = 612
End
Begin VB.Line Line1
X1 = 0
X2 = 3360
Y1 = 1680
Y2 = 1680
End
Begin VB.Label Label5
Height = 372
Left = 1920
TabIndex = 10
Top = 1920
Width = 972
End
Begin VB.Label Label4
Caption = "Y="
Height = 252
Left = 2040
TabIndex = 9
Top = 1080
Width = 252
End
Begin VB.Label Label3
Caption = "X+"
Height = 252
Left = 960
TabIndex = 8
Top = 1080
Width = 252
End
Begin VB.Label Label2
Caption = "Y="
Height = 252
Left = 2040
TabIndex = 7
Top = 360
Width = 252
End
Begin VB.Label Label1
Caption = "X+"
Height = 252
Left = 960
TabIndex = 6
Top = 360
Width = 252
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub A1_GotFocus()
A1.SelStart = 0
A1.SelLength = Len(A1.Text)
End Sub
Private Sub A2_GotFocus()
A2.SelStart = 0
A2.SelLength = Len(A2.Text)
End Sub
Private Sub B1_GotFocus()
B1.SelStart = 0
B1.SelLength = Len(B1.Text)
End Sub
Private Sub B2_GotFocus()
B2.SelStart = 0
B2.SelLength = Len(B2.Text)
End Sub
Private Sub C1_GotFocus()
C1.SelStart = 0
C1.SelLength = Len(C1.Text)
End Sub
Private Sub C2_GotFocus()
C2.SelStart = 0
C2.SelLength = Len(C2.Text)
End Sub
Private Sub Command1_Click()
t = A1.Text * B2.Text - A2.Text * B1.Text
x = (C1.Text * B2.Text - C2.Text * B1.Text) / t
y = (A1.Text * C2.Text - A2.Text * C1.Text) / t
Label5.Caption = "x=" & Str(x) & Chr(13) & Chr(10) & "y=" & Str(y)
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?