VB6 Switch和Choose的用法
来源:互联网 发布:巨浪金融研究所数据 编辑:程序博客网 时间:2024/06/06 12:59
Option Explicit
Private Sub Command1_Click()
'VB的Switch语句
Dim strKey As String
Dim strGetValue As String
strKey = "2"
strGetValue = Switch(strKey = "1", "a", strKey = "2", "b")
MsgBox strGetValue '得到 b
End Sub
Private Sub Command2_Click()
'VB的Choose语句
Dim strKey As String
Dim strGetValue As String
strKey = "3"
strGetValue = Choose(strKey, "a", "b", "c")
MsgBox strGetValue '得到c
End Sub
Private Sub Command1_Click()
'VB的Switch语句
Dim strKey As String
Dim strGetValue As String
strKey = "2"
strGetValue = Switch(strKey = "1", "a", strKey = "2", "b")
MsgBox strGetValue '得到 b
End Sub
Private Sub Command2_Click()
'VB的Choose语句
Dim strKey As String
Dim strGetValue As String
strKey = "3"
strGetValue = Choose(strKey, "a", "b", "c")
MsgBox strGetValue '得到c
End Sub
0 0
- VB6 Switch和Choose的用法
- <c:choose>和<fmt:formatDate>的用法
- ToggleButton和Switch的用法
- 枚举和switch的用法
- android的toogleButton和switch的用法
- switch() case注意的地方和用法
- Golang的switch和select用法
- EL表达式 choose的用法
- mybatis choose标签的用法
- VB6对象浏览器的用法
- switch-case的用法
- java switch的用法
- switch的一点用法
- svn switch的用法
- switch的方便用法
- switch的神奇用法
- switch的用法
- SWITCH的特殊用法
- 对新员工的谈话
- 关于x64汇编调用api的问题
- 扩大Vmware虚拟机中Ubuntu系统磁盘空间的方法
- 请教汇编ALIGN伪指令的问题
- 0K6410学习之linux移植nand flash
- VB6 Switch和Choose的用法
- MySQL触发器Trigger实例篇
- loading黑马程序员之高级编程:代理(4-4)
- 32位hook还原
- 九宫棋
- eclipse中为了format的代码更加好看,少换行,可以设置java、xml、jsp的代码line width。
- 条码控件TBarCode SDK使用教程:嵌入条码图像
- C#语句控制 判断语句、case里面的goto语句、foreach语句
- CES2014展会曲面大屏幕电视忽如一夜春风来