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

📄 instruct.frm

📁 小宠物-电子鸡源程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form4 
   AutoRedraw      =   -1  'True
   BackColor       =   &H80000005&
   BorderStyle     =   0  'None
   ClientHeight    =   3450
   ClientLeft      =   2295
   ClientTop       =   1605
   ClientWidth     =   5100
   ClipControls    =   0   'False
   Icon            =   "Instruct.frx":0000
   LinkTopic       =   "Form5"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2381.251
   ScaleMode       =   0  'User
   ScaleWidth      =   4789.164
   ShowInTaskbar   =   0   'False
   Begin VB.Image Picture1 
      Height          =   3450
      Left            =   0
      Top             =   0
      Width           =   5100
   End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Module:   Instruct.frm
'                Displays Instructions
'Author:    Pheeraphat Sawangphian
'E-Mail:     tooh@thaimail.com
'URL:       http://www.geocities.com/Hollywood/Lot/6166

Option Explicit
Dim StartMove As Boolean
Dim DifferenceX As Single
Dim DifferenceY As Single
Dim OldX As Single
Dim OldY As Single
Dim PageNumber As Integer
Dim LastPageNumber As Integer
Dim DefaultInstructions As String

Private Sub Form_Load()
    Dim PageFound As Boolean
    
    PageFound = True
    PageNumber = 1

    If Form1.Plugins <> "" And Dir(App.Path + "\plugins\" + Form1.Plugins + "\instruct\page" + Format(PageNumber, "00") + ".gif", vbNormal) <> "" Then
        DefaultInstructions = "\plugins\" + Form1.Plugins + "\instruct\page"
    ElseIf Dir(App.Path + "\instruct\page" + Format(PageNumber, "00") + ".gif") <> "" Then
        DefaultInstructions = "\instruct\page"
    Else
        PageFound = False
    End If
    
    Form1.DoLoadPointer Form1.Plugins, Picture1, "\other\", "instruct.cur"

    If PageFound Then
        LastPageNumber = 1
        
        Do
            LastPageNumber = LastPageNumber + 1
        Loop While Dir(App.Path + DefaultInstructions + Format(LastPageNumber, "00") + ".gif", vbNormal) <> ""
        
        LastPageNumber = LastPageNumber - 1
        PlayWave App.Path + "\sounds\pageup.wav", Form1.mPopupSound.Checked, Form1.mPopupWave.Checked
        Picture1.Picture = LoadPicture(App.Path + DefaultInstructions + Format(PageNumber, "00") + ".gif")
        Left = (Screen.Width - Width) / 2
        Top = (Screen.Height - Height) / 2
        Form1.Enabled = False
        Form1.mPopupStatus.Enabled = Form1.Enabled
        Form1.mPopupOnTop.Enabled = Form1.Enabled
        Form1.mCheats.Enabled = Form1.Enabled
        Form1.mPopupChangeColor.Enabled = Form1.Enabled
        Form1.mPopupPlugins.Enabled = Form1.Enabled
        Form1.mPopupInstructions.Enabled = Form1.Enabled
        Form1.mPopupAbout.Enabled = Form1.Enabled

        If Form1.mPopupInsulatingSheet.Checked Then
            Form5.Enabled = False
        Else
            Form1.mPopupInsulatingSheet.Enabled = False
        End If
        
        Caption = Form1.mPopupInstructions.Caption
        AlwaysOnTop Me, Form1.mPopupOnTop.Checked
        StartMove = False
        SendKeys "{TAB}"
    Else
        Unload Form4
    End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Form1.Enabled = True
    Form1.mPopupStatus.Enabled = Form1.Enabled
    Form1.mPopupOnTop.Enabled = Form1.Enabled
    Form1.mCheats.Enabled = Form1.Enabled
    Form1.mPopupChangeColor.Enabled = Form1.Enabled
    Form1.mPopupPlugins.Enabled = Form1.Enabled
    Form1.mPopupInstructions.Enabled = Form1.Enabled
    Form1.mPopupAbout.Enabled = Form1.Enabled

    If Form1.mPopupInsulatingSheet.Checked Then
        Form5.Enabled = True
    Else
        Form1.mPopupInsulatingSheet.Enabled = True
    End If
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Or KeyCode = vbKeyPageDown Or KeyCode = vbKeyRight Or KeyCode = vbKeyDown Then
        DoNextPage
    ElseIf KeyCode = vbKeyPageUp Or KeyCode = vbKeyBack Or KeyCode = vbKeyLeft Or KeyCode = vbKeyUp Then
        DoPreviousPage
    ElseIf PageNumber > 1 And KeyCode = vbKeyHome Then
        PageNumber = 0
        DoNextPage
    ElseIf PageNumber < LastPageNumber And KeyCode = vbKeyEnd Then
        PageNumber = LastPageNumber - 1
        DoNextPage
    ElseIf KeyCode = vbKeyEscape Or KeyCode = vbKeyF1 Then
        Unload Form4
    End If
End Sub

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoMouseDown Button, X, Y
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoMouseMove Button, X, Y
End Sub

Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoMouseUp Button
End Sub

Public Sub DoNextPage()
    PageNumber = PageNumber + 1
    
    If PageNumber > LastPageNumber Then
        PageNumber = 1
    End If
    
    If Dir(App.Path + DefaultInstructions + Format(PageNumber, "00") + ".gif", vbNormal) <> "" Then
        PlayWave App.Path + "\sounds\pageup.wav", Form1.mPopupSound.Checked, Form1.mPopupWave.Checked
        Picture1.Picture = LoadPicture(App.Path + DefaultInstructions + Format(PageNumber, "00") + ".gif")
    ElseIf PageNumber = 1 Then
        PageNumber = LastPageNumber
    Else
        PageNumber = PageNumber - 1
    End If
End Sub

Public Sub DoPreviousPage()
    PageNumber = PageNumber - 1

    If PageNumber < 1 Then
        PageNumber = LastPageNumber
    End If

    If Dir(App.Path + DefaultInstructions + Format(PageNumber, "00") + ".gif", vbNormal) <> "" Then
        PlayWave App.Path + "\sounds\pagedown.wav", Form1.mPopupSound.Checked, Form1.mPopupWave.Checked
        Picture1.Picture = LoadPicture(App.Path + DefaultInstructions + Format(PageNumber, "00") + ".gif")
    ElseIf PageNumber = LastPageNumber Then
        PageNumber = 1
    Else
        PageNumber = PageNumber + 1
    End If
End Sub

Private Sub DoMouseDown(Button As Integer, X As Single, Y As Single)
    If Button = 1 Then
        If Not StartMove Then
            DifferenceX = X
            DifferenceY = Y
            OldX = Left
            OldY = Top
            StartMove = True
        End If
    End If
End Sub

Private Sub DoMouseMove(Button As Integer, X As Single, Y As Single)
    If Button = 1 Then
        If StartMove Then
            Move Left + (X - DifferenceX), Top + (Y - DifferenceY)
            DoEvents 'make sure it cleans up
        End If
    End If
End Sub

Private Sub DoMouseUp(Button As Integer)
    If Button = 1 Then
        If StartMove Then
            StartMove = False
            
            If Left = OldX And Top = OldY Then
                DoNextPage
            End If
        End If
    ElseIf Button = 2 Then
        DoPreviousPage
    End If
End Sub

⌨️ 快捷键说明

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