当前位置: 代码迷 >> C语言 >> [求助]vb中,如何把x的值填到代码中
  详细解决方案

[求助]vb中,如何把x的值填到代码中

热度:137   发布时间:2007-11-12 12:29:36.0
[求助]vb中,如何把x的值填到代码中
例如
Select Case t1.Text
Case "sdcdwsc"
If t2.Text = 19931022 Then
Timer2.Enabled = False
MsgBox "欢迎"
Shell ("f:\123.cmd")
End
Else
Timer2.Enabled = False
MsgBox "密码错误,退出!", vbCritical, "error"
End
End If
Case "sdcdwt"
If t2.Text = "196739" Then
Timer2.Enabled = False
MsgBox "欢迎"
Shell ("f:\321.cmd")
End
Else
Timer2.Enabled = False
MsgBox "密码错误,退出!", vbCritical, "error"
End
End If
Case "sdcdtzz"
If t2.Text = "680711" Then
Timer2.Enabled = False
MsgBox "欢迎"
Shell ("f:\213.cmd")
End
Else
Timer2.Enabled = False
MsgBox "密码错误,退出!", vbCritical, "error"
End
End If
'我想把x的值导入到这里
Case Else
Timer2.Enabled = False
MsgBox "用户名错误,退出", vbCritical, "error"
End
End Select
x的值为
Case "xxx"
If t2.Text = "123456" Then
Timer2.Enabled = False
MsgBox "欢迎"
Shell ("f:\213.cmd")
End
Else
Timer2.Enabled = False
MsgBox "密码错误,退出!", vbCritical, "error"
End
End If
谢谢了!!

----------------解决方案--------------------------------------------------------
大哥,发错板块了

另外,不太理解你的意思,能用简单一点的例子来表达吗?
----------------解决方案--------------------------------------------------------

你好像发错帖了.
让程序从外部读入,先打开文件,再读就是了


----------------解决方案--------------------------------------------------------
Visuao C++6.0

----------------解决方案--------------------------------------------------------
  相关解决方案