本论文在其他论文栏目,由论文格式网整理,转载请注明来源www.lwgsw.com,更多论文,请点论文格式范文查看
'数字按下、松开
Private Sub cmdNum_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Show_b Picture5, P8, cmdNum(Index)
End Sub
Private Sub cmdNum_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Show_b Picture5, P9, cmdNum(Index)
End Sub
'**************************************************
'角度、弧度
Private Sub cmdOp_1_Click(Index As Integer)
MPl.Play
Select Case Index
Case 0
If g = 1 Then
If op = "" Then
e = Str((Val(e) * 180 / Pi))
txtDisp.Text = e
Else
f = Str((Val(e) * 180 / Pi))
txtDisp.Text = f
End If
chk = 1
g = Pi / 180
End If
ShowNumARG Pt, wPw1(3), 19
Case 1
If g <> 1 Then
If op = "" Then
e = Str((Val(e) * Pi / 180))
txtDisp.Text = e
Else
f = Str((Val(e) * Pi / 180))
txtDisp.Text = f
End If
chk = 1
g = 1
End If
ShowNumARG Pt, wPw1(3), 20
Case 2
' g = 1
ShowNumARG Pt, wPw1(3), 21
End Select
End Sub
Private Sub cmdOp_1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Show_b Picture5, P9, cmdOp_1(Index)
End Sub
Private Sub cmdOp_1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Show_b Picture5, P8, cmdOp_1(Index)
End Sub
'**************************************************
'单一功能键按下、松开
Private Sub cmdops_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Show_b Picture5, P8, cmdOps(Index)
End Sub
Private Sub cmdops_MouseUp(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Show_b Picture5, P9, cmdOps(Index)
End Sub
'**************************************************
'单一功能键按下、松开
Private Sub cmdOps_Click(Index As Integer)
Dim sum As Double, i As Integer
On Error GoTo eh1
MPl.Play
Select Case Index
Case 0
e = Str(Sqr(Val(e)))
ShowNumFun Pt, wPw1(3), 10
Ji_suan
Case 1
If e <> 0 Then
e = -Val(txtDisp)
Else
e = 0
End If
Ji_suan
Case 2
e = Str(Sin(Val(e) * g))
ShowNumFun Pt, wPw1(3), Index - 1
Ji_suan
Case 3
e = Str(Cos(Val(e) * g))
ShowNumFun Pt, wPw1(3), Index - 1
Ji_suan
Case 4
e = Str(Tan(Val(e) * g))
ShowNumFun Pt, wPw1(3), Index - 1
Ji_suan
Case 5
e = Str(Atn(Val(e)))
ShowNumFun Pt, wPw1(3), Index - 1
Ji_suan
Case 6
e = Str(1 / Sin(Val(e) * g))
ShowNumFun Pt, wPw1(3), Index - 1
Ji_suan
Case 7
e = Str(1 / Cos(Val(e) * g))
ShowNumFun Pt, wPw1(3), Index - 1
Ji_suan
Case 8
e = Str(Exp(Val(e)))
ShowNumFun Pt, wPw1(3), Index - 1
Ji_suan
Case 9
e = Str(Log(Val(e)))
ShowNumFun Pt, wPw1(3), Index - 1
Ji_suan
Case 10
Randomize
If op = "" Then
e = Str(9999999999# * Rnd)
txtDisp.Text = e
f = ""
Else
f = Str(99999999 * Rnd)
txtDisp.Text = f
End If
ShowNumFun Pt, wPw1(3), Index - 1
Case 11
e = Str(1 / Val(e))
Ji_suan
*** 第11-23种情况略****
Case 24
If s_mem_B = False Then
If op = "" Then
e = Str(S_mem)
txtDisp.Text = e
f = ""
Else
f = Str(S_mem)
txtDisp.Text = f
End If
s_mem_B = True
Else
S_mem = 0
s_mem_B = False
End If
End Select
Exit Sub
eh1:
txtDisp.Text = "-E-"
e = ""
f = ""
op = ""
End Sub
Private Sub cmdAC_Click()
MPl.Play
g = 1
ShowNumFun Pt, wPw2(3), 1
ShowNumARG Pt, wPw1(3), 20
e = ""
f = ""
op = ""
txtDisp.Text = "0"
End Sub
Private Sub cmdAC_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Show_b Picture5, P8, cmdAC
End Sub
Private Sub cmdAC_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
Show_b Picture5, P9, cmdAC
End Sub
Private Sub cmdEq_Click()
MPl.Play
If op = "" Then
e = Str(-(Val(e)))
txtDisp.Text = e
Else
f = Str(-(Val(e)))
txtDisp.Text = f