⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 f1.frm

📁 这是一个VB 俄罗斯方块 1.0.0 一个好玩的游戏
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   7875
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5655
   LinkTopic       =   "Form1"
   ScaleHeight     =   7875
   ScaleWidth      =   5655
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton c 
      Caption         =   "4"
      Enabled         =   0   'False
      Height          =   375
      Index           =   16
      Left            =   480
      TabIndex        =   15
      Top             =   3600
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Appearance      =   0  'Flat
      Caption         =   "3"
      Enabled         =   0   'False
      Height          =   375
      Index           =   7
      Left            =   1080
      TabIndex        =   14
      Top             =   840
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Appearance      =   0  'Flat
      Caption         =   "4"
      Enabled         =   0   'False
      Height          =   375
      Index           =   8
      Left            =   1080
      TabIndex        =   13
      Top             =   480
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Appearance      =   0  'Flat
      Caption         =   "2"
      Enabled         =   0   'False
      Height          =   375
      Index           =   6
      Left            =   720
      TabIndex        =   12
      Top             =   840
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Appearance      =   0  'Flat
      Caption         =   "1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   5
      Left            =   360
      TabIndex        =   11
      Top             =   840
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Caption         =   "1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   13
      Left            =   1200
      TabIndex        =   10
      Top             =   3240
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Caption         =   "2"
      Enabled         =   0   'False
      Height          =   375
      Index           =   14
      Left            =   840
      TabIndex        =   9
      Top             =   3240
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Caption         =   "3"
      Enabled         =   0   'False
      Height          =   375
      Index           =   15
      Left            =   480
      TabIndex        =   8
      Top             =   3240
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Caption         =   "1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   9
      Left            =   720
      TabIndex        =   7
      Top             =   2520
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Caption         =   "2"
      Enabled         =   0   'False
      Height          =   375
      Index           =   10
      Left            =   720
      TabIndex        =   6
      Top             =   2160
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Caption         =   "3"
      Enabled         =   0   'False
      Height          =   375
      Index           =   11
      Left            =   720
      TabIndex        =   5
      Top             =   1800
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.CommandButton c 
      Caption         =   "4"
      Enabled         =   0   'False
      Height          =   375
      Index           =   12
      Left            =   360
      TabIndex        =   4
      Top             =   1800
      Visible         =   0   'False
      Width           =   375
   End
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   5040
      Top             =   120
   End
   Begin VB.CommandButton c 
      Appearance      =   0  'Flat
      Caption         =   "4"
      Enabled         =   0   'False
      Height          =   375
      Index           =   4
      Left            =   2760
      TabIndex        =   3
      TabStop         =   0   'False
      Top             =   1080
      Width           =   375
   End
   Begin VB.CommandButton c 
      Appearance      =   0  'Flat
      Caption         =   "3"
      Enabled         =   0   'False
      Height          =   375
      Index           =   3
      Left            =   2400
      TabIndex        =   2
      TabStop         =   0   'False
      Top             =   1080
      Width           =   375
   End
   Begin VB.CommandButton c 
      Appearance      =   0  'Flat
      Caption         =   "2"
      Enabled         =   0   'False
      Height          =   375
      Index           =   2
      Left            =   2400
      TabIndex        =   1
      TabStop         =   0   'False
      Top             =   720
      Width           =   375
   End
   Begin VB.CommandButton c 
      Appearance      =   0  'Flat
      Caption         =   "1"
      Enabled         =   0   'False
      Height          =   375
      Index           =   1
      Left            =   2400
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   360
      Width           =   375
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim l As Integer
Dim t As Integer



Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
 
 
'正L旋转-----------------------------------------------------------
 If KeyCode = &H26 And t = 4 Then
    c(3).Top = c(2).Top + 360: c(3).Left = c(2).Left
    c(1).Top = c(2).Top - 360: c(1).Left = c(2).Left
    c(4).Top = c(2).Top + 360: c(4).Left = c(2).Left + 360
    
    t = 1
    GoTo lll
 End If
 If KeyCode = &H26 And t = 3 Then
    c(3).Top = c(2).Top: c(3).Left = c(2).Left - 360
    c(1).Top = c(2).Top: c(1).Left = c(2).Left + 360
    c(4).Top = c(2).Top + 360: c(4).Left = c(2).Left - 360
    
    t = 4
    GoTo lll
 End If
If KeyCode = &H26 And t = 2 Then
    c(3).Top = c(2).Top + 360: c(3).Left = c(2).Left
    c(1).Top = c(2).Top - 360: c(1).Left = c(2).Left
    c(4).Top = c(2).Top - 360: c(4).Left = c(2).Left - 360
    
    t = 3
    GoTo lll
 End If
 If KeyCode = &H26 And t = 1 Then
    c(3).Top = c(2).Top: c(3).Left = c(2).Left + 360
    c(1).Top = c(2).Top: c(1).Left = c(2).Left - 360
    c(4).Top = c(2).Top - 360: c(4).Left = c(2).Left + 360
    
    t = 2
    GoTo lll
 End If
'------------------------------------------------------------------
lll:
End Sub

Private Sub Form_Load()

t = 1
End Sub


Private Sub Timer1_Timer()
 c(2).Top = c(2).Top + 360
 If t = 1 Then
    c(3).Top = c(2).Top + 360: c(3).Left = c(2).Left
    c(1).Top = c(2).Top - 360: c(1).Left = c(2).Left
    c(4).Top = c(2).Top + 360: c(4).Left = c(2).Left + 360
 End If
 If t = 4 Then
    c(3).Top = c(2).Top: c(3).Left = c(2).Left - 360
    c(1).Top = c(2).Top: c(1).Left = c(2).Left + 360
    c(4).Top = c(2).Top + 360: c(4).Left = c(2).Left - 360
 End If
If t = 3 Then
    c(3).Top = c(2).Top + 360: c(3).Left = c(2).Left
    c(1).Top = c(2).Top - 360: c(1).Left = c(2).Left
    c(4).Top = c(2).Top - 360: c(4).Left = c(2).Left - 360
 End If
 If t = 2 Then
    c(3).Top = c(2).Top: c(3).Left = c(2).Left + 360
    c(1).Top = c(2).Top: c(1).Left = c(2).Left - 360
    c(4).Top = c(2).Top - 360: c(4).Left = c(2).Left + 360
 End If

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -