科学计算器vb代码.docx
- 文档编号:1792820
- 上传时间:2022-10-24
- 格式:DOCX
- 页数:22
- 大小:40.38KB
科学计算器vb代码.docx
《科学计算器vb代码.docx》由会员分享,可在线阅读,更多相关《科学计算器vb代码.docx(22页珍藏版)》请在冰豆网上搜索。
科学计算器vb代码
∙
用VB写计算器似乎有很多例子,这个代码就就是其中之一,科学计算器就是在基本计算器的基础上,加入角度、弧度、梯度、正切、余切、正弦余弦、平方根等的数学计算,当然基础的加减乘除运算就更不用说了,这就是在一本VB教程中摘录的代码,您可以此为基础完善扩展该计算器的功能,运行截图如下:
核心代码,只有一个文件代码:
VERSION5、00
BeginVB、FormFrm_Scientific
Caption="计算器"
ClientHeight=2925
ClientLeft=165
ClientTop=735
ClientWidth=5595
LinkTopic="Form1"
LockControls=-1'True
MaxButton=0'False
ScaleHeight=2925
ScaleWidth=5595
StartUpPosition=3'窗口缺省
BeginVB、CommandButtonCmd_Rnd
Caption="Rnd"
Height=390
Left=5025
TabIndex=39
Top=1455
Width=510
End
BeginVB、CommandButtonCmd_PI
Caption="PI"
Height=390
Left=1575
TabIndex=38
Top=2400
Width=630
End
BeginVB、CommandButtonCmd_Fact
Caption="N!
"
Height=390
Left=1575
TabIndex=37
Top=1935
Width=630
End
BeginVB、CommandButtonCmd_Log
Caption="Log"
Height=390
Left=1575
TabIndex=36
Top=1455
Width=630
End
BeginVB、CommandButtonCmd_Ln
Caption="Ln"
Height=390
Left=1575
TabIndex=35
Top=960
Width=630
End
BeginVB、CommandButtonCmd_Square
Caption="X^2"
Height=390
Left=840
TabIndex=34
Top=2400
Width=630
End
BeginVB、CommandButtonCmd_Cube
Caption="X^3"
Height=390
Left=825
TabIndex=33
Top=1935
Width=630
End
BeginVB、CommandButtonCmd_Operator
Caption="X^Y"
Height=390
Index=5
Left=840
TabIndex=32
Top=1455
Width=630
End
BeginVB、CommandButtonCmd_Exp
Caption="Exp"
Height=390
Left=840
TabIndex=31
Top=960
Width=630
End
BeginVB、CommandButtonCmd_Sin
Caption="Sin"
Height=390
Left=120
TabIndex=30
Top=960
Width=630
End
BeginVB、CommandButtonCmd_Cos
Caption="Cos"
Height=390
Left=120
TabIndex=29
Top=1455
Width=630
End
BeginVB、CommandButtonCmd_Tan
Caption="Tan"
Height=390
Left=120
TabIndex=28
Top=1935
Width=630
End
BeginVB、CommandButtonCmd_Atan
Caption="Atan"
Height=390
Left=120
TabIndex=27
Top=2400
Width=630
End
BeginVB、FrameFrame1
Height=510
Left=90
TabIndex=23
Top=330
Width=2625
BeginVB、OptionButtonOtn_Grd
Caption="梯度"
Height=180
Left=1695
TabIndex=26
Top=210
Width=750
End
BeginVB、OptionButtonOtn_Rad
Caption="弧度"
Height=180
Left=900
TabIndex=25
Top=210
Width=795
End
BeginVB、OptionButtonOtn_Deg
Caption="角度"
Height=180
Left=135
TabIndex=24
Top=210
Value=-1'True
Width=675
End
End
BeginVB、CommandButtonCmd_Operator
Caption="="
Height=390
Index=4
Left=5025
TabIndex=22
Top=2400
Width=510
End
BeginVB、CommandButtonCmd_Operator
Caption="+"
Height=390
Index=3
Left=4470
MaskColor=&H00808080&
Style=1'Graphical
TabIndex=21
Top=2400
Width=510
End
BeginVB、CommandButtonCommand1
Caption="、"
Height=390
Index=11
Left=3915
TabIndex=20
Top=2400
Width=510
End
BeginVB、CommandButtonCommand1
Caption="+/-"
Height=390
Index=10
Left=3360
TabIndex=19
Top=2400
Width=510
End
BeginVB、CommandButtonCommand1
Caption="0"
Height=390
Index=0
Left=2820
TabIndex=18
Top=2400
Width=510
End
BeginVB、CommandButtonCmd_fraction
Caption="1/x"
Height=390
Left=5025
TabIndex=17
Top=1935
Width=510
End
BeginVB、CommandButtonCmd_sqrt
Caption="Sqrt"
Height=390
Left=5025
TabIndex=16
Top=960
Width=510
End
BeginVB、CommandButtonCmd_C
Caption="C"
Height=405
Left=4785
TabIndex=15
Top=405
Width=750
End
BeginVB、CommandButtonCmd_CE
Caption="CE"
Height=405
Left=3975
TabIndex=14
Top=405
Width=750
End
BeginVB、CommandButtonCmd_Backspace
Caption="Backspace"
Height=405
Left=2820
TabIndex=13
Top=405
Width=1110
End
BeginVB、CommandButtonCmd_Operator
Caption="-"
Height=390
Index=2
Left=4470
TabIndex=12
Top=1935
Width=510
End
BeginVB、CommandButtonCmd_Operator
Caption="*"
Height=390
Index=1
Left=4470
TabIndex=11
Top=1455
Width=510
End
BeginVB、CommandButtonCmd_Operator
Caption="/"
Height=390
Index=0
Left=4470
TabIndex=10
Top=960
Width=510
End
BeginVB、CommandButtonCommand1
Caption="9"
Height=390
Index=9
Left=3915
TabIndex=9
Top=960
Width=510
End
BeginVB、CommandButtonCommand1
Caption="8"
Height=390
Index=8
Left=3360
TabIndex=8
Top=960
Width=510
End
BeginVB、CommandButtonCommand1
Caption="7"
Height=390
Index=7
Left=2820
TabIndex=7
Top=960
Width=510
End
BeginVB、CommandButtonCommand1
Caption="6"
Height=390
Index=6
Left=3915
TabIndex=6
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 科学 计算器 vb 代码
![提示](https://static.bdocx.com/images/bang_tan.gif)