📄 nexttetris.ctl
字号:
VERSION 5.00
Begin VB.UserControl NextTetris
BackColor = &H00000000&
CanGetFocus = 0 'False
ClientHeight = 3150
ClientLeft = 0
ClientTop = 0
ClientWidth = 4320
ScaleHeight = 210
ScaleMode = 3 'Pixel
ScaleWidth = 288
Begin VB.Image imgTetris
Height = 600
Index = 6
Left = 360
Picture = "NextTetris.ctx":0000
Top = 2280
Visible = 0 'False
Width = 900
End
Begin VB.Image imgTetris
Height = 600
Index = 5
Left = 3120
Picture = "NextTetris.ctx":1C62
Top = 1200
Visible = 0 'False
Width = 900
End
Begin VB.Image imgTetris
Height = 600
Index = 4
Left = 1800
Picture = "NextTetris.ctx":38C4
Top = 1200
Visible = 0 'False
Width = 900
End
Begin VB.Image imgTetris
Height = 600
Index = 3
Left = 360
Picture = "NextTetris.ctx":5526
Top = 1200
Visible = 0 'False
Width = 900
End
Begin VB.Image imgTetris
Height = 600
Index = 2
Left = 3120
Picture = "NextTetris.ctx":7188
Top = 240
Visible = 0 'False
Width = 900
End
Begin VB.Image imgTetris
Height = 600
Index = 1
Left = 1800
Picture = "NextTetris.ctx":8DEA
Top = 240
Visible = 0 'False
Width = 600
End
Begin VB.Image imgTetris
Height = 300
Index = 0
Left = 240
Picture = "NextTetris.ctx":A0EC
Top = 360
Visible = 0 'False
Width = 1200
End
End
Attribute VB_Name = "NextTetris"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private m_Tetris As Long
Public Property Get Tetris() As Long
Tetris = m_Tetris
End Property
Public Property Let Tetris(ByVal vNew As Long)
If vNew < 0 Then
vNew = -1
ElseIf vNew > 6 Then
vNew = -1
End If
If m_Tetris = vNew Then
Exit Property
End If
If m_Tetris >= 0 Then
imgTetris(m_Tetris).Visible = False
End If
m_Tetris = vNew
If m_Tetris >= 0 Then
Call UserControl_Resize
imgTetris(m_Tetris).Visible = True
End If
End Property
Private Sub UserControl_Initialize()
m_Tetris = -1
End Sub
Private Sub UserControl_Resize()
Dim nTop As Long, nLeft As Long
If m_Tetris >= 0 Then
nTop = (UserControl.ScaleHeight - imgTetris(m_Tetris).Height) / 2
nLeft = (UserControl.ScaleWidth - imgTetris(m_Tetris).Width) / 2
imgTetris(m_Tetris).Move nLeft, nTop
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -