This repository was archived by the owner on Feb 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathfrmMain.frm
166 lines (155 loc) · 4.74 KB
/
frmMain.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
VERSION 5.00
Begin VB.Form frmMain
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00000000&
Caption = "Super Mario Bros. X - Version 1.2.2 - www.SuperMarioBrothers.org"
ClientHeight = 9000
ClientLeft = 120
ClientTop = 510
ClientWidth = 12000
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
MouseIcon = "frmMain.frx":628A
Picture = "frmMain.frx":6594
ScaleHeight = 600
ScaleMode = 3 'Pixel
ScaleWidth = 800
StartUpPosition = 2 'CenterScreen
Begin VB.PictureBox LoadCoin
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H00000000&
BorderStyle = 0 'None
Height = 480
Left = 11400
Picture = "frmMain.frx":EFBF
ScaleHeight = 32
ScaleMode = 3 'Pixel
ScaleWidth = 28
TabIndex = 0
Top = 8400
Width = 420
End
Begin VB.Image Loader
Height = 240
Left = 9480
Picture = "frmMain.frx":F3D3
Top = 8640
Width = 1770
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public LockSize As Boolean
Private Sub Form_DblClick()
If Me.WindowState = 0 Then Exit Sub
LockSize = True
If resChanged = False Then
If Me.WindowState = 2 Then
Me.WindowState = 0
Me.BorderStyle = 2
Me.Caption = "Super Mario Bros. X - Version 1.3 - www.SuperMarioBrothers.org"
Else
Me.BorderStyle = 0
Me.Caption = ""
DoEvents
Me.WindowState = 2
End If
End If
LockSize = False
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
inputKey = KeyCode
If KeyCode = 13 Then
keyDownEnter = True
ElseIf KeyCode = 18 Then
keyDownAlt = True
End If
If keyDownEnter = True And keyDownAlt = True And TestLevel = False Then
keyDownAlt = False
keyDownEnter = False
ChangeScreen
End If
If KeyCode = vbKeyF12 Then TakeScreen = True
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
CheatCode Chr(KeyAscii)
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
keyDownEnter = False
ElseIf KeyCode = 18 Then
keyDownAlt = False
End If
End Sub
Private Sub Form_Load()
LockSize = True
Do While frmMain.ScaleWidth > 800
Me.Width = Me.Width - 5
Loop
Do While frmMain.ScaleHeight > 600
Me.Height = Me.Height - 5
Loop
Do While frmMain.ScaleWidth < 800
Me.Width = Me.Width + 5
Loop
Do While frmMain.ScaleHeight < 600
Me.Height = Me.Height + 5
Loop
LockSize = False
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
MenuMouseDown = True
MenuMouseMove = True
Else
MenuMouseBack = True
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MenuMouseX = Int(X * ScreenW / frmMain.ScaleWidth)
MenuMouseY = Int(Y * ScreenH / frmMain.ScaleHeight)
MenuMouseMove = True
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MenuMouseDown = False
MenuMouseRelease = True
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
ShowCursor True
ShowCursor True
ShowCursor True
ShowCursor True
ShowCursor True
End Sub
Private Sub Form_Resize()
If LockSize = True Or resChanged = True Then Exit Sub
LockSize = True
If Me.WindowState = 0 Then
Me.BorderStyle = 2
Me.Caption = "Super Mario Bros. X - Version 1.3 - www.SuperMarioBrothers.org"
ElseIf Me.WindowState = 2 Then
Me.WindowState = 0
Me.BorderStyle = 0
Me.Caption = ""
DoEvents
DoEvents
Me.WindowState = 2
DoEvents
End If
SetupScreens
LockSize = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
ShowCursor True
ShowCursor True
ShowCursor True
ShowCursor True
ShowCursor True
KillIt
End Sub