- 20
- 0
- 约2.02万字
- 约 19页
- 2020-09-10 发布于天津
- 举报
?
用 VB 写计算器似乎有很多例子,这个代码就是其中之一,科学计算器是在基本计算
器的基础上,加入角度、弧度、梯度、正切、余切、正弦余弦、平方根等的数学计
算,当然基础的加减乘除运算就更不用说了,这是在一本 VB 教程中摘录的代码,你
可以此为基础完善扩展该计算器的功能,运行截图如下:
核心代码,只有一个文件代码:
VERSION 5.00
Begin VB.Form Frm_Scientific
Caption = 计算器
ClientHeight = 2925
ClientLeft = 165
ClientTop = 735
ClientWidth = 5595
LinkTopic = Form1
LockControls = -1 True
MaxButton = 0 False
ScaleHeight = 2925
ScaleWidth = 5595
StartUpPosition = 3 窗口缺省
Begin VB.CommandButton Cmd_Rnd
Caption = Rnd
Height = 390
Left = 5025
TabIndex = 39
Top = 1455
Width = 510
精选文档
End
Begin VB.CommandButton Cmd_PI
Caption = PI
Height = 390
Left = 1575
TabIndex = 38
Top = 2400
Width = 630
End
Begin VB.CommandButton Cmd_Fact
Caption = N!
Height = 390
Left = 1575
TabIndex = 37
Top = 1935
Width = 630
End
Begin VB.CommandButton Cmd_Log
Caption = Log
Height = 390
Left = 1575
TabIndex = 36
Top = 1455
Width = 630
End
Begin VB.CommandButton Cmd_Ln
Caption = Ln
Height = 390
Left = 1575
TabIndex = 35
Top = 960
Width = 630
End
Begin VB.CommandButton Cmd_Square
Caption = X^2
Height = 390
— 2
精选文档
Left = 840
TabIndex = 34
Top = 2400
Width = 630
End
Begin VB.CommandButton Cmd_Cube
Caption = X^3
原创力文档

文档评论(0)