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

📄 octopus.frm

📁 VB版的小游戏
💻 FRM
📖 第 1 页 / 共 5 页
字号:
      Top             =   4005
      Visible         =   0   'False
      Width           =   360
   End
   Begin VB.Image Diver 
      Height          =   390
      Index           =   6
      Left            =   705
      Picture         =   "Octopus.frx":27A0E
      Top             =   4005
      Visible         =   0   'False
      Width           =   360
   End
   Begin VB.Image Diver 
      Height          =   390
      Index           =   5
      Left            =   345
      Picture         =   "Octopus.frx":27FFA
      Top             =   4005
      Visible         =   0   'False
      Width           =   360
   End
   Begin VB.Image Diver 
      Height          =   390
      Index           =   4
      Left            =   -15
      Picture         =   "Octopus.frx":285FE
      Top             =   4005
      Visible         =   0   'False
      Width           =   360
   End
   Begin VB.Image Diver 
      Height          =   330
      Index           =   3
      Left            =   1170
      Picture         =   "Octopus.frx":28C06
      Top             =   3675
      Visible         =   0   'False
      Width           =   390
   End
   Begin VB.Image Diver 
      Height          =   330
      Index           =   2
      Left            =   780
      Picture         =   "Octopus.frx":2913A
      Top             =   3675
      Visible         =   0   'False
      Width           =   390
   End
   Begin VB.Image Diver 
      Height          =   330
      Index           =   1
      Left            =   390
      Picture         =   "Octopus.frx":2966E
      Top             =   3675
      Visible         =   0   'False
      Width           =   390
   End
   Begin VB.Image Diver 
      Height          =   330
      Index           =   0
      Left            =   0
      Picture         =   "Octopus.frx":29BA2
      Top             =   3675
      Visible         =   0   'False
      Width           =   390
   End
   Begin VB.Image OnTheBoat 
      Height          =   225
      Index           =   1
      Left            =   315
      Picture         =   "Octopus.frx":2A0D6
      Top             =   3450
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.Image DiverStep 
      Height          =   225
      Index           =   0
      Left            =   1485
      Picture         =   "Octopus.frx":2A682
      ToolTipText     =   "Diver"
      Top             =   780
      Width           =   315
   End
   Begin VB.Image Remainder1 
      Height          =   225
      Left            =   1800
      Picture         =   "Octopus.frx":2AC2E
      ToolTipText     =   "Diver"
      Top             =   780
      Width           =   165
   End
   Begin VB.Image Remainder0 
      Height          =   225
      Left            =   1995
      Picture         =   "Octopus.frx":2B126
      ToolTipText     =   "Diver"
      Top             =   780
      Width           =   165
   End
   Begin VB.Image OnTheBoat 
      Height          =   225
      Index           =   0
      Left            =   0
      Picture         =   "Octopus.frx":2B61E
      Top             =   3450
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.Image GWLogo 
      Height          =   540
      Index           =   1
      Left            =   1785
      Picture         =   "Octopus.frx":2BBCA
      Top             =   2985
      Visible         =   0   'False
      Width           =   630
   End
   Begin VB.Image GWLogo 
      Height          =   540
      Index           =   0
      Left            =   1155
      Picture         =   "Octopus.frx":2C63E
      Top             =   2985
      Visible         =   0   'False
      Width           =   630
   End
   Begin VB.Image GameType 
      Enabled         =   0   'False
      Height          =   75
      Index           =   1
      Left            =   1380
      Picture         =   "Octopus.frx":2D0B2
      ToolTipText     =   "About Game&Watch Simulator"
      Top             =   2115
      Visible         =   0   'False
      Width           =   315
   End
   Begin VB.Image GameType 
      Enabled         =   0   'False
      Height          =   75
      Index           =   0
      Left            =   1380
      Picture         =   "Octopus.frx":2D1F2
      ToolTipText     =   "About Game&Watch Simulator"
      Top             =   2025
      Visible         =   0   'False
      Width           =   330
   End
   Begin VB.Image Button1 
      Height          =   360
      Index           =   1
      Left            =   360
      Picture         =   "Octopus.frx":2D30E
      ToolTipText     =   "Left"
      Top             =   3090
      Visible         =   0   'False
      Width           =   360
   End
   Begin VB.Image Button1 
      Height          =   360
      Index           =   0
      Left            =   0
      Picture         =   "Octopus.frx":2D992
      ToolTipText     =   "Left"
      Top             =   3090
      Visible         =   0   'False
      Width           =   360
   End
   Begin VB.Image Button0 
      Height          =   120
      Index           =   1
      Left            =   225
      Picture         =   "Octopus.frx":2E016
      ToolTipText     =   "Game A"
      Top             =   2970
      Visible         =   0   'False
      Width           =   225
   End
   Begin VB.Image Button0 
      Height          =   120
      Index           =   0
      Left            =   0
      Picture         =   "Octopus.frx":2E162
      ToolTipText     =   "Game A"
      Top             =   2970
      Visible         =   0   'False
      Width           =   225
   End
   Begin VB.Image Logo 
      Height          =   540
      Left            =   195
      ToolTipText     =   "About Game & Watch Simulator"
      Top             =   420
      Width           =   630
   End
   Begin VB.Image ACLButton 
      Height          =   105
      Left            =   4635
      ToolTipText     =   "ACL"
      Top             =   870
      Width           =   105
   End
   Begin VB.Image AlarmButton 
      Height          =   105
      Left            =   4635
      ToolTipText     =   "ALARM"
      Top             =   525
      Width           =   105
   End
   Begin VB.Image RightButton 
      Height          =   360
      Left            =   4245
      ToolTipText     =   "Button 2/Minute setting"
      Top             =   1920
      Width           =   360
   End
   Begin VB.Image LeftButton 
      Height          =   360
      Left            =   375
      ToolTipText     =   "Button 1/Hour setting"
      Top             =   1905
      Width           =   360
   End
   Begin VB.Image TimeButton 
      Height          =   120
      Left            =   4230
      ToolTipText     =   "TIME"
      Top             =   1020
      Width           =   225
   End
   Begin VB.Image GameBButton 
      Height          =   120
      Left            =   4230
      ToolTipText     =   "GAME B"
      Top             =   690
      Width           =   225
   End
   Begin VB.Image GameAButton 
      Height          =   120
      Left            =   4230
      ToolTipText     =   "GAME A"
      Top             =   360
      Width           =   225
   End
   Begin VB.Image FrontCase 
      Height          =   2970
      Left            =   0
      Picture         =   "Octopus.frx":2E3E2
      Top             =   0
      Width           =   4995
   End
   Begin VB.Menu mPopupMenu 
      Caption         =   "PopupMenu"
      Visible         =   0   'False
      Begin VB.Menu mHide 
         Caption         =   "&Hide"
      End
      Begin VB.Menu mSound 
         Caption         =   "&Sound"
      End
      Begin VB.Menu mAutoShow 
         Caption         =   "A&uto Show"
      End
      Begin VB.Menu mAlwaysOnTop 
         Caption         =   "Always on &Top"
      End
      Begin VB.Menu mBack 
         Caption         =   "&Back"
      End
      Begin VB.Menu mSep0 
         Caption         =   "-"
      End
      Begin VB.Menu mOptions 
         Caption         =   "&Options..."
      End
      Begin VB.Menu mInstructions 
         Caption         =   "&Instructions..."
      End
      Begin VB.Menu mAbout 
         Caption         =   "&About..."
      End
      Begin VB.Menu mSep1 
         Caption         =   "-"
      End
      Begin VB.Menu mExit 
         Caption         =   "&Exit"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Module:   Octopus.frm
'Author:    Pheeraphat Sawangphian
'E-Mail:     tooh@thaimail.com
'URL:       http://www.geocities.com/Hollywood/Lot/6166/

Option Explicit

'Windows 32 API
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function CreateRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function ScreenToClient Lib "user32" (ByVal hWnd As Long, lpPoint As POINTAPI) As Long
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean

Private Const NIM_ADD = &H0          'add an icon into system tray
Private Const NIM_MODIFY = &H1    'update an icon in system tray
Private Const NIM_DELETE = &H2    'remove an icon from system tray

Private Const NIF_MESSAGE = &H1  'return messages
Private Const NIF_ICON = &H2          'adding an icon
Private Const NIF_TIP = &H4             'adding a tip

'constant need for the callback
Private Const WM_LBUTTONDBLCLK = &H203
Private Const WM_RBUTTONUP = &H205
Private Const WM_MOUSEMOVE = &H200

'system tray notification definitions
Private Type NOTIFYICONDATA
    cbSize As Long
    hWnd As Long
    uId As Long
    uFlags As Long
    ucallbackMessage As Long
    hIcon As Long
    szTip As String * 64
End Type

Private SystemTray As NOTIFYICONDATA

'Constants for SetWindowPos
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
    
'Constants for sndPlaySound
Private Const SND_ASYNC = &H1                        'play asynchronously
Private Const SND_NODEFAULT = &H2              'silence not default, if sound not found

'Type for GetCursorPos
Private Type POINTAPI
    X As Long
    Y As Long
End Type

Dim TentacleNo As Byte
Dim DifferenceX As Integer
Dim DifferenceY As Integer
Dim StartMoving As Boolean
Dim ButtonNo As Integer
Dim GameNo As Byte
Dim ButtonPressed As Boolean
Dim Bag As Byte
Dim EndOfTentacle(5) As Byte
Dim TentacleDirection(5) As Byte
Dim TentacleCount(5) As Byte
Dim MaxTentacleCount(5) As Byte
Dim DiverPosition As Byte
Dim Score As Integer
Dim Miss As Byte
Dim Playing As Boolean
Dim LatestSecond As Byte
Dim Add3Score As Byte
Dim SecondCount As Integer
Dim ScoreShown As Boolean
Dim OnTheBoatCount As Byte
Dim Caught As Byte
Dim ClearMissCount As Byte
Dim TempCount As Byte
Dim SetAlarm As Byte
Dim SetTime As Byte
Dim AlarmTime As String
Dim AlarmOn As Boolean
Dim ButtonPressedTime As Byte
Dim StopAlarm As Boolean
Dim Alarming As Boolean

Private Sub Alarm_DblClick(Index As Integer)
    mBack_Click
End Sub

Private Sub Alarm_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 Alarm_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

⌨️ 快捷键说明

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