vb 俄罗斯方块 下落
发布网友
发布时间:2024-05-09 08:31
我来回答
共3个回答
热心网友
时间:2024-06-03 09:01
将 Sub JudgeY() 改为
Function JudgeY() As Boolean
Function JudgeY() As Boolean
GetCoor
For i = 1 To 4
If Xs(i).cZ Then
On Error Resume Next
If Xs(i).cY > 0 Then
If Total(Xs(i).cX, Xs(i).cY + 1) Or Xs(i).cY = 20 Then
'如果不能移动,将4点位置的坐标设置为 True,并将图形固定下来
For j = 1 To 4
Total(Xs(j).cX, Xs(j).cY) = True
Next j
picBackGround.PaintPicture picPictureNow.Picture, picPictureNow.Left, picPictureNow.Top, picPictureNow.Width, picPictureNow.Height, , , , , vbSrcAnd
Judge_Full
If picPictureNow.Visible Then Init
JudgeY = False
Exit Function
End If
End If
End If
Next
JudgeY = True
End Function
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
里添加以下代码
Case vbKeySpace
While JudgeY
picPictureNow.Picture = imgPictureNowBackup.Picture
r = BitBlt(picPictureTemp.hDC, 0, 0, picPictureNow.Width * 20, picPictureNow.Height * 20, picBackGround.hDC, picPictureNow.Left * 20, (picPictureNow.Top + 1) * 20, vbSrcCopy)
picPictureNow.Top = picPictureNow.Top + 1
r = BitBlt(picPictureNow.hDC, 0, 0, picPictureNow.Width * 20, picPictureNow.Height * 20, picPictureTemp.hDC, 0, 0, vbSrcAnd)
Wend
If picPictureNow.Top + picPictureNow.Height > picBackGround.ScaleHeight Then Init
这样就行了
热心网友
时间:2024-06-03 08:58
给你一个100多行就搞定的方块吧
在地址栏输入
0xffffff.cn/fk.zip
热心网友
时间:2024-06-03 08:56
一般下载的时候就有提示,自己找找