vb 中怎样编写按键影响事件

2024-12-21 15:41:44
推荐回答(3个)
回答1:

For i = 190 To 10 Step -10
If cmdfang(i).Visible = True And _
cmdfang(i + 1).Visible = True And _
cmdfang(i + 2).Visible = True And _
cmdfang(i + 3).Visible = True And _
cmdfang(i + 4).Visible = True And _
cmdfang(i + 5).Visible = True And _
cmdfang(i + 6).Visible = True And _
cmdfang(i + 7).Visible = True And _
cmdfang(i + 8).Visible = True And _
cmdfang(i + 9).Visible = True Then
For j = i + 4 To i Step -1
t = 1
cmdfang(j).Visible = False
cmdfang(2 * i + 9 - j).Visible = False
For k = 1 To 4000
DoEvents
Next
t = 0
Next
linenum = linenum + 1
For j = i - 1 To 0 Step -1
If cmdfang(j).Visible = True Then
cmdfang(j).Visible = False
cmdfang(j + 10).Visible = True
End If
Next
clearline '为了实现连消数行,这里使用递归调用
End If
Next

回答2:

你直接说要什么功能不就得了哈。难道是退格?
如果你要全,建议你找一下“vb编写俄罗斯方块”的相关教程,我记得vbgood论坛好象有一篇专门的这方面教程。如果你实现某一个独立功能,说清楚一点。

回答3:

vb也有键盘响应事件,找下form1命令