VB程序题

VB程序题,第1张

1、KeyPress

2、KeyAscii >=48 AND KeyAscii <=57

3、Text2.Text &Chr(KeyAscii)

以上是在Text2上将每次符合条件轿键的字符都依次连接起来显示。如果是每次要在Text2上只显示一团庆个字符,则将第3空闭或巧改为:

Chr(KeyAscii)

aa = Replace("00 7B 86 01 44 45", "00 7B ", "逗腔"数敬)

aa = Replace(aa, " 44 45"薯指慎, "")

新建仿弊锋一个VB,加入4个CHECKBOX 一个COMMAND 和一个Label

复备晌制以下代码就OK了

Private Sub Command1_Click()

Dim gl

gl = ","

If Check1.Value Then gl = gl &Check1.Caption &","

If Check2.Value Then gl = gl &Check2.Caption &","

If Check3.Value Then gl = gl &Check3.Caption &"卜困,"

If Check4.Value Then gl = gl &Check4.Caption &","

Label1.Caption = ""

For a = 1 To 100

If InStr(gl, a) = 0 Then Label1.Caption = Label1.Caption &a &","

Next

End Sub

Private Sub Form_Load()

Check1.Caption = "1"

Check2.Caption = "2"

Check3.Caption = "20,22,29"

Check4.Caption = "30,31,50"

End Sub


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/8266696.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-14
下一篇 2023-04-14

发表评论

登录后才能评论

评论列表(0条)

保存