?? form1.frm
字號:
VERSION 5.00
Begin VB.Form Form1
Caption = "復數(shù)(Complex Number)的四則運算"
ClientHeight = 2988
ClientLeft = 2124
ClientTop = 1992
ClientWidth = 4596
LinkTopic = "Form1"
ScaleHeight = 2988
ScaleWidth = 4596
WindowState = 2 '最大化
Begin VB.CommandButton Command2
Caption = "三復數(shù)的運算"
Height = 564
Left = 1272
TabIndex = 1
Top = 1968
Width = 1956
End
Begin VB.CommandButton Command1
Caption = "兩復數(shù)的運算"
Height = 564
Left = 1248
TabIndex = 0
Top = 1272
Width = 1956
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "執(zhí)行結(jié)果請參考即時運算視窗"
Height = 180
Left = 1080
TabIndex = 2
Top = 408
Width = 2340
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Dim x As Complex, y As Complex, a As Complex, s As Complex
Dim m As Complex, d As Complex, sq As Complex, mo As Double
x.r = 3: x.i = 4
y.r = 8: y.i = -6
a = Add(x, y)
s = Subtract(x, y)
m = Multiply(x, y)
d = Divide(x, y)
sq = Square(x)
mo = Modulus(x)
Debug.Print a.r & " + " & a.i & "i"
Debug.Print s.r & " + " & s.i & "i"
Debug.Print m.r & " + " & m.i & "i"
Debug.Print d.r & " + " & d.i & "i"
Debug.Print sq.r & " + " & sq.i & "i"
Debug.Print mo
End Sub
Private Sub Command2_Click()
Dim a As Complex, x As Complex, y As Complex, z As Complex
x.r = 3: x.i = 4
y.r = 8: y.i = -6
z.r = 2: z.i = 5
a = Subtract(Add(x, y), z)
Debug.Print a.r & " + " & a.i & "i"
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -