📄 octopus.frm
字号:
SaveSetting "Game & Watch Simulator", "Octopus", "Game A High Score", 0
SaveSetting "Game & Watch Simulator", "Octopus", "Game B High Score", 0
SaveSetting "Game & Watch Simulator", "Octopus", "Alarm Time", "120000 PM"
SaveSetting "Game & Watch Simulator", "Octopus", "Alarm On", False
ResetScreen.Visible = False
Playing = False
DoClearScreen
SetAlarm = 0
SetTime = 1
StopAlarm = False
Alarming = False
Timer1.Interval = 200
BabyOctopus.Visible = False
AlarmTime = "120000 AM"
DoShowTime AlarmTime
ElseIf KeyCode = vbKeyS Then 'Sound On/Off
mSound_Click
End If
ButtonPressed = False
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static lngMsg As Long
Static blnFlag As Boolean
lngMsg = X / Screen.TwipsPerPixelX 'get a callback message returned from system tray
If blnFlag = False Then
blnFlag = True
If lngMsg <> 34 Then
Select Case lngMsg
Case WM_LBUTTONDBLCLK 'icon in system tray is double-clicked
mHide_Click
Case WM_RBUTTONUP 'icon in system tray is right-clicked
Me.PopupMenu mPopupMenu 'show popup menu
End Select
blnFlag = False
End If
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call Shell_NotifyIcon(NIM_DELETE, SystemTray) 'remove an icon from system tray
Timer1.Interval = 0 'disable a timer control
End
End Sub
Private Sub ACLButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Not ButtonPressed Then
If Button = 1 Then
ResetScreen.Visible = True
ACLButton.Picture = Button2(1).Picture
ButtonNo = 7
ElseIf ButtonNo = -1 Then
Form1.PopupMenu mPopupMenu
End If
End If
End Sub
Private Sub ACLButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
ResetScreen.Visible = False
DoButtonUp
End If
End Sub
Private Sub AlarmButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Not ButtonPressed And (Add3Score = 0 Or Not Playing) Then
If Button = 1 Then
AlarmButton.Picture = Button2(1).Picture
ButtonNo = 6
If (Not Playing Or Miss = 4) And SetTime = 0 Then
If Miss = 4 Then
DoClearCurrentGame
DoStartAgain
End If
If SetAlarm = 0 Then
DoClearScreen
SetAlarm = 1
DoShowTime GetSetting("Game & Watch Simulator", "Octopus", "Alarm Time")
BabyOctopus.Visible = True
AlarmOn = GetSetting("Game & Watch Simulator", "Octopus", "Alarm On")
Else
AlarmOn = Not AlarmOn
End If
Note.Visible = AlarmOn
End If
ElseIf ButtonNo = -1 Then
Form1.PopupMenu mPopupMenu
End If
End If
End Sub
Private Sub AlarmButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoButtonUp
End If
End Sub
Private Sub GameAButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Not ButtonPressed And (Add3Score = 0 Or Not Playing) Then
If Button = 1 Then
GameAButton.Picture = Button0(1).Picture
ButtonNo = 1
If (Not Playing Or Miss = 4) And SetAlarm = 0 And SetTime = 0 Then
DoShowScore (GetSetting("Game & Watch Simulator", "Octopus", "Game A High Score"))
DoShowGameType (1)
End If
ElseIf ButtonNo = -1 Then
Form1.PopupMenu mPopupMenu
End If
End If
End Sub
Private Sub GameAButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoButtonUp
End If
End Sub
Private Sub GameBButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Not ButtonPressed And (Add3Score = 0 Or Not Playing) Then
If Button = 1 Then
GameBButton.Picture = Button0(1).Picture
ButtonNo = 2
If (Not Playing Or Miss = 4) And SetAlarm = 0 And SetTime = 0 Then
DoShowScore (GetSetting("Game & Watch Simulator", "Octopus", "Game B High Score"))
DoShowGameType (2)
End If
ElseIf ButtonNo = -1 Then
Form1.PopupMenu mPopupMenu
End If
End If
End Sub
Private Sub GamebButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoButtonUp
End If
End Sub
Private Sub HourDigit_DblClick(Index As Integer)
mBack_Click
End Sub
Private Sub HourDigit_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseDown Button, Shift, X, Y
Else
Form1.PopupMenu mPopupMenu
End If
End Sub
Private Sub HourDigit_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseMove Button, Shift, X, Y
End If
End Sub
Private Sub HourDigit_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMouseUp Button, Shift, X, Y
End Sub
Private Sub LeftButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Not ButtonPressed And (Add3Score = 0 Or Not Playing) Then
If Button = 1 Then
LeftButton.Picture = Button1(1).Picture
ButtonNo = 4
ButtonPressedTime = 0
ElseIf ButtonNo = -1 Then
Form1.PopupMenu mPopupMenu
End If
End If
End Sub
Private Sub Legs_DblClick()
mBack_Click
End Sub
Private Sub Legs_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseDown Button, Shift, X, Y
Else
Form1.PopupMenu mPopupMenu
End If
End Sub
Private Sub Legs_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseMove Button, Shift, X, Y
End If
End Sub
Private Sub Legs_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMouseUp Button, Shift, X, Y
End Sub
Private Sub Logo_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Not ButtonPressed Then
If Button = 1 Then
ButtonNo = 8
ElseIf ButtonNo = -1 And Button = 2 Then
Form1.PopupMenu mPopupMenu
If Logo.Picture <> GWLogo(0).Picture Then
Logo.Picture = GWLogo(0).Picture
End If
End If
End If
End Sub
Private Sub LeftButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoButtonUp
End If
End Sub
Private Sub Logo_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If ButtonNo = -1 And Logo.Picture <> GWLogo(1).Picture Then
Logo.Picture = GWLogo(1).Picture
End If
End Sub
Private Sub Logo_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoButtonUp
End If
End Sub
Private Sub mAbout_Click()
Load Form2
Form2.Show
End Sub
Private Sub mAlwaysOnTop_Click()
mAlwaysOnTop.Checked = Not mAlwaysOnTop.Checked
SaveSetting "Game & Watch Simulator", "Octopus", "Always on Top", mAlwaysOnTop.Checked
If mAlwaysOnTop.Checked Then
SetWindowPos Form1.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE
Else
SetWindowPos Form1.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVE
End If
End Sub
Private Sub mAutoShow_Click()
mAutoShow.Checked = Not mAutoShow.Checked
SaveSetting "Game & Watch Simulator", "Octopus", "Auto Show", mAutoShow.Checked
End Sub
Private Sub mBack_Click()
BackCase.Visible = Not BackCase.Visible
mBack.Checked = BackCase.Visible
End Sub
Private Sub mExit_Click()
Unload Form1
End Sub
Private Sub mHide_Click()
mHide.Checked = Not mHide.Checked
If mHide.Checked Then
Form1.Hide
Else
Form1.Show
End If
End Sub
Private Sub mInstructions_Click()
Load Form4
Form4.Show
End Sub
Private Sub MinuteDigit_DblClick(Index As Integer)
mBack_Click
End Sub
Private Sub MinuteDigit_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseDown Button, Shift, X, Y
Else
Form1.PopupMenu mPopupMenu
End If
End Sub
Private Sub MinuteDigit_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseMove Button, Shift, X, Y
End If
End Sub
Private Sub MinuteDigit_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMouseUp Button, Shift, X, Y
End Sub
Private Sub MissPic_DblClick()
mBack_Click
End Sub
Private Sub MissPic_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseDown Button, Shift, X, Y
Else
Form1.PopupMenu mPopupMenu
End If
End Sub
Private Sub MissPic_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseMove Button, Shift, X, Y
End If
End Sub
Private Sub MissPic_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMouseUp Button, Shift, X, Y
End Sub
Private Sub mOptions_Click()
Load Form3
Form3.Show
End Sub
Private Sub mSound_Click()
mSound.Checked = Not mSound.Checked
SaveSetting "Game & Watch Simulator", "Octopus", "Sound", mSound.Checked
End Sub
Private Sub Note_DblClick()
mBack_Click
End Sub
Private Sub Note_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseDown Button, Shift, X, Y
Else
Form1.PopupMenu mPopupMenu
End If
End Sub
Private Sub Note_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseMove Button, Shift, X, Y
End If
End Sub
Private Sub Note_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMouseUp Button, Shift, X, Y
End Sub
Private Sub Octopus_DblClick(Index As Integer)
mBack_Click
End Sub
Private Sub Octopus_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseDown Button, Shift, X, Y
Else
Form1.PopupMenu mPopupMenu
End If
End Sub
Private Sub Octopus_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseMove Button, Shift, X, Y
End If
End Sub
Private Sub Octopus_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMouseUp Button, Shift, X, Y
End Sub
Private Sub Remainder0_DblClick()
mBack_Click
End Sub
Private Sub Remainder0_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseDown Button, Shift, X, Y
Else
Form1.PopupMenu mPopupMenu
End If
End Sub
Private Sub Remainder0_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
DoMouseMove Button, Shift, X, Y
End If
End Sub
Private Sub Remainder0_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -