VB简单计算器编程代码(附图)
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
课程设计说明书正文
一、题目:计算器的创作和相应程序的编写
二、本题的主要功能:通过计算器的创作熟悉各控件的属性和练习程序的编写。
三、程序截图:
四、源程序清单:
Begin VB.Form Form1
Caption = "计算器"
ClientHeight = 3765
ClientLeft = 165
ClientTop = 855
ClientWidth = 5355
Icon = "Form1.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 3765
ScaleWidth = 5355
StartUpPosition = 3 '窗口缺省
Begin mandButton Command4
Caption = "="
Height = 495
Left = 4470
TabIndex = 28
Top = 3060
Width = 735
End
Begin mandButton Command3 Caption = "1/x"
Height = 495
Left = 4470
TabIndex = 27
Top = 2520
Width = 735
End
Begin mandButton Command2 Caption = "%"
Height = 495
Left = 4470
TabIndex = 26
Top = 1980
Width = 735
End
Begin mandButton Command1 Caption = "sqrt"
Height = 495
Left = 4470
TabIndex = 25
Top = 1440
Width = 735
End
Begin mandButton cmbDOT Caption = "."
Height = 495
Left = 2910
TabIndex = 24
Top = 3060
Width = 735
End
Begin mandButton cmbZF Caption = "+/-"
Height = 495
Left = 2130
TabIndex = 23
Top = 3060
Width = 735 End
Begin mandButton cmbSign Caption = "+"
Height = 495
Index = 3
Left = 3690
TabIndex = 22
Top = 3060
Width = 735 End
Begin mandButton cmbSign Caption = "-"
Height = 495
Index = 2
Left = 3690
TabIndex = 21
Top = 2520
Width = 735 End
Begin mandButton cmbSign Caption = "*"
Height = 495
Index = 1
Left = 3690
TabIndex = 20
Top = 1980
Width = 735
End
Begin mandButton cmbSign Caption = "/"
Height = 495
Index = 0
Left = 3690
TabIndex = 19
Top = 1440
Width = 735
End
Begin mandButton cmbNUM Caption = "9"
Height = 495
Index = 9
Left = 2910
TabIndex = 18
Top = 1440
Width = 735
End
Begin mandButton cmbNUM Caption = "8"
Height = 495
Index = 8
Left = 2130
TabIndex = 17
Top = 1440
Width = 735
End
Begin mandButton cmbNUM Caption = "7"
Height = 495
Index = 7
Left = 1350
TabIndex = 16
Width = 735
End
Begin mandButton cmbNUM Caption = "6"
Height = 495
Index = 6
Left = 2910
TabIndex = 15
Top = 1980
Width = 735
End
Begin mandButton cmbNUM Caption = "5"
Height = 495
Index = 5
Left = 2130
TabIndex = 14
Top = 1980
Width = 735
End
Begin mandButton cmbNUM Caption = "4"
Height = 495
Index = 4
Left = 1350
TabIndex = 13
Top = 1980
Width = 735
End
Begin mandButton cmbNUM Caption = "3"
Height = 495
Index = 3