- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章vb简易计算器源码由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
代码如下:
复制代码 代码如下
/** *Author:乌鸟heart *Version:1.0 */ Dim IntX As Double '全局变量,用于存储计算的数值 Dim IntOperation As Double '标记运算类型 Dim isBegin As Boolean '标记是否已经给IntX赋值 Public Sub Clear() '清空命令函数 screen.Caption = "" End Sub Public Sub SavaToIntX() Select Case IntOperation Case 1 '加法 If isBegin = False Then IntX = Val(screen.Caption) isBegin = True Else IntX = IntX + Val(screen.Caption) End If Case 2 '减法 If isBegin = False Then IntX = Val(screen.Caption) isBegin = True Else IntX = IntX - Val(screen.Caption) End If Case 3 '乘法 If isBegin = False Then IntX = Val(screen.Caption) isBegin = True Else IntX = IntX * Val(screen.Caption) 'screen.Caption = IntX End If Case 4 '除法 If isBegin = False Then IntX = Val(screen.Caption) isBegin = True Else IntX = IntX / Val(screen.Caption) End If End Select End Sub Private Sub Command0_Click() screen.Caption = screen.Caption & 0 End Sub Private Sub Command1_Click() screen.Caption = screen.Caption & 1 End Sub Private Sub Command2_Click() screen.Caption = screen.Caption & 2 End Sub Private Sub Command3_Click() screen.Caption = screen.Caption & 3 End Sub Private Sub Command4_Click() screen.Caption = screen.Caption & 4 End Sub Private Sub Command5_Click() screen.Caption = screen.Caption & 5 End Sub Private Sub Command6_Click() screen.Caption = screen.Caption & 6 End Sub Private Sub Command7_Click() screen.Caption = screen.Caption & 7 End Sub Private Sub Command8_Click() screen.Caption = screen.Caption & 8 End Sub Private Sub Command9_Click() screen.Caption = screen.Caption & 9 End Sub Private Sub CommandClear_Click() '清空命令 isBegin = False IntOperation = 0 IntX = 0 screen.Caption = "" End Sub Private Sub CommandEqual_Click() '等号运算 If IntOperation <> 0 Then '有运算标记的情况 Call SavaToIntX IntOperation = 0 isBegin = False screen.Caption = IntX End If End Sub Private Sub CommandMinus_Click() '减法运算 If IntOperation <> 0 Then '有运算标记的情况 Call SavaToIntX IntOperation = 2 Call Clear Else IntOperation = 2 Call SavaToIntX Call Clear End If End Sub Private Sub CommandMultiple_Click() '乘法运算 If IntOperation <> 0 Then '有运算标记的情况 Call SavaToIntX IntOperation = 3 Call Clear Else IntOperation = 3 Call SavaToIntX Call Clear End If End Sub Private Sub CommandPlus_Click() '加法运算 If IntOperation <> 0 Then '有运算标记的情况 Call SavaToIntX IntOperation = 1 Call Clear Else IntOperation = 1 Call SavaToIntX Call Clear End If End Sub Private Sub CommandSlash_Click() '除法运算 If IntOperation <> 0 Then '有运算标记的情况 Call SavaToIntX IntOperation = 4 Call Clear Else IntOperation = 4 Call SavaToIntX Call Clear End If End Sub 。
最后此篇关于vb简易计算器源码的文章就讲到这里了,如果你想了解更多关于vb简易计算器源码的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
我正在设计一个可在hbase上运行的应用程序,并且希望以交互方式浏览集群的内容。我在hbase shell中,我想对所有以chars“abc”开头的键进行扫描。这样的键可能包括“abc4”,“abc9
我是一名优秀的程序员,十分优秀!