home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2001 January
/
VPR0101A.BIN
/
PROGRAM
/
Form1.frm
< prev
next >
Wrap
Text File
|
2000-10-25
|
9KB
|
306 lines
VERSION 5.00
Begin VB.Form Form1
AutoRedraw = -1 'True
Caption = "ブロック消し"
ClientHeight = 6000
ClientLeft = 60
ClientTop = 345
ClientWidth = 7455
LinkTopic = "Form1"
MaxButton = 0 'False
Picture = "Form1.frx":0000
ScaleHeight = 400
ScaleMode = 3 'ピクセル
ScaleWidth = 497
StartUpPosition = 3 'Windows の既定値
Begin VB.Timer Timer1
Interval = 50
Left = 1920
Top = 2640
End
Begin VB.ComboBox Combo1
Height = 300
Left = 2400
Style = 2 'ドロップダウン リスト
TabIndex = 6
Top = 5520
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "START"
Default = -1 'True
Height = 375
Left = 4800
TabIndex = 5
Top = 5520
Width = 1215
End
Begin VB.PictureBox paddle
Appearance = 0 'フラット
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'なし
Enabled = 0 'False
ForeColor = &H80000008&
Height = 255
Left = 4800
Picture = "Form1.frx":91B82
ScaleHeight = 17
ScaleMode = 3 'ピクセル
ScaleWidth = 49
TabIndex = 4
Top = 1560
Visible = 0 'False
Width = 735
End
Begin VB.PictureBox ball
Appearance = 0 'フラット
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'なし
Enabled = 0 'False
ForeColor = &H80000008&
Height = 255
Left = 4920
Picture = "Form1.frx":92104
ScaleHeight = 17
ScaleMode = 3 'ピクセル
ScaleWidth = 17
TabIndex = 3
Top = 960
Visible = 0 'False
Width = 255
End
Begin VB.PictureBox mainscr
Appearance = 0 'フラット
AutoRedraw = -1 'True
BackColor = &H00C0C0C0&
BorderStyle = 0 'なし
ForeColor = &H80000008&
Height = 735
Left = 1320
ScaleHeight = 49
ScaleMode = 3 'ピクセル
ScaleWidth = 129
TabIndex = 2
Top = 480
Width = 1935
End
Begin VB.PictureBox blocks
Appearance = 0 'フラット
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'なし
Enabled = 0 'False
ForeColor = &H80000008&
Height = 2175
Left = 3960
Picture = "Form1.frx":92586
ScaleHeight = 145
ScaleMode = 3 'ピクセル
ScaleWidth = 33
TabIndex = 1
Top = 480
Visible = 0 'False
Width = 495
End
Begin VB.PictureBox offscr
Appearance = 0 'フラット
AutoRedraw = -1 'True
BackColor = &H00C0C0C0&
BorderStyle = 0 'なし
Enabled = 0 'False
ForeColor = &H80000008&
Height = 735
Left = 1320
ScaleHeight = 49
ScaleMode = 3 'ピクセル
ScaleWidth = 129
TabIndex = 0
Top = 1440
Visible = 0 'False
Width = 1935
End
Begin VB.Label lblball
BackColor = &H00000000&
Caption = "0"
BeginProperty Font
Name = "MS Pゴシック"
Size = 14.25
Charset = 128
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0080C0FF&
Height = 255
Left = 6840
TabIndex = 11
Top = 4845
Width = 255
End
Begin VB.Label lblscore
BackColor = &H00000000&
Caption = "0000"
BeginProperty Font
Name = "MS Pゴシック"
Size = 14.25
Charset = 128
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0080C0FF&
Height = 255
Left = 5040
TabIndex = 10
Top = 4845
Width = 735
End
Begin VB.Label lblhiscore
BackColor = &H00000000&
Caption = "00000"
BeginProperty Font
Name = "MS Pゴシック"
Size = 14.25
Charset = 128
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0080C0FF&
Height = 255
Left = 3000
TabIndex = 9
Top = 4845
Width = 975
End
Begin VB.Label lblstage
BackColor = &H00000000&
Caption = "00"
BeginProperty Font
Name = "MS Pゴシック"
Size = 14.25
Charset = 128
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0080C0FF&
Height = 255
Left = 1200
TabIndex = 8
Top = 4845
Width = 495
End
Begin VB.Label Label1
Caption = "SPEED :"
BeginProperty Font
Name = "MS Pゴシック"
Size = 14.25
Charset = 128
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1080
TabIndex = 7
Top = 5520
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'-----------------------------------------------------------------------
' イベントハンドラ
'-----------------------------------------------------------------------
'STARTボタンが押されたときに呼ばれるハンドラ
Private Sub Command1_Click()
'ステージ開始
StartStage
End Sub
'タイマーから一定時間ごとに呼ばれるハンドラ
Private Sub Timer1_Timer()
If boPlaying Then
'インターバル処理
TimerProc
'ステージクリアか判定
If IsClearStage Then
ClearStage
End If
'ゲームオーバーか判定
If IsGameOver Then
GameOver
End If
End If
End Sub
'マウスをクリックしたときに呼ばれるハンドラ
Private Sub mainscr_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'ステージ開始
StartStage
End Sub
'マウスが移動したときに呼ばれるハンドラ
Private Sub mainscr_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'マウス移動処理
MouseMoveProc Int(X)
End Sub
'-----------------------------------------------------------------------
' ゲームの制御
'-----------------------------------------------------------------------
'ステージ開始処理
Private Sub StartStage()
If Not boPlaying Then
Form1.Command1.Enabled = False 'STARTボタンを禁止
Form1.Combo1.Enabled = False '速度選択コンボを禁止
boPlaying = True 'プレイ中
'ステージ開始処理
StartStageProc
End If
End Sub
'ステージクリア処理
Private Sub ClearStage()
If boPlaying Then
'ステージクリア処理
ClearStageProc
Form1.Command1.Enabled = True 'STARTボタンを許可
Form1.Combo1.Enabled = True '速度選択コンボを許可
boPlaying = True 'プレイ中でない
End If
End Sub
'ゲームオーバー処理
Private Sub GameOver()
If boPlaying Then
'ゲームオーバー処理
GameOverProc
Form1.Command1.Enabled = True 'STARTボタンを許可
Form1.Combo1.Enabled = True '速度選択コンボを許可
boPlaying = True 'プレイ中でない
End If
End Sub