www.pudn.com > ccsplay.zip > GOODBYE.FRM


VERSION 5.00 
Begin VB.Form GoodBye  
   Appearance      =   0  'Flat 
   BackColor       =   &H80000005& 
   BorderStyle     =   0  'None 
   Caption         =   "  Bye !   See You !" 
   ClientHeight    =   3480 
   ClientLeft      =   0 
   ClientTop       =   0 
   ClientWidth     =   4905 
   Icon            =   "GoodBye.frx":0000 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   232 
   ScaleMode       =   3  'Pixel 
   ScaleWidth      =   327 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   2  'CenterScreen 
   Begin VB.Timer Finale  
      Enabled         =   0   'False 
      Interval        =   1000 
      Left            =   2760 
      Top             =   3600 
   End 
   Begin VB.PictureBox T5  
      Appearance      =   0  'Flat 
      BackColor       =   &H80000005& 
      BorderStyle     =   0  'None 
      ForeColor       =   &H80000008& 
      Height          =   300 
      Left            =   1800 
      Picture         =   "GoodBye.frx":030A 
      ScaleHeight     =   20 
      ScaleMode       =   3  'Pixel 
      ScaleWidth      =   20 
      TabIndex        =   9 
      Top             =   3600 
      Width           =   300 
   End 
   Begin VB.PictureBox T4  
      Appearance      =   0  'Flat 
      BackColor       =   &H80000005& 
      BorderStyle     =   0  'None 
      ForeColor       =   &H80000008& 
      Height          =   300 
      Left            =   1440 
      Picture         =   "GoodBye.frx":079F 
      ScaleHeight     =   20 
      ScaleMode       =   3  'Pixel 
      ScaleWidth      =   20 
      TabIndex        =   8 
      Top             =   3600 
      Width           =   300 
   End 
   Begin VB.PictureBox T3  
      Appearance      =   0  'Flat 
      BackColor       =   &H80000005& 
      BorderStyle     =   0  'None 
      ForeColor       =   &H80000008& 
      Height          =   300 
      Left            =   1080 
      Picture         =   "GoodBye.frx":0B41 
      ScaleHeight     =   20 
      ScaleMode       =   3  'Pixel 
      ScaleWidth      =   20 
      TabIndex        =   7 
      Top             =   3600 
      Width           =   300 
   End 
   Begin VB.PictureBox T2  
      Appearance      =   0  'Flat 
      BackColor       =   &H80000005& 
      BorderStyle     =   0  'None 
      ForeColor       =   &H80000008& 
      Height          =   300 
      Left            =   720 
      Picture         =   "GoodBye.frx":0EEB 
      ScaleHeight     =   20 
      ScaleMode       =   3  'Pixel 
      ScaleWidth      =   20 
      TabIndex        =   6 
      Top             =   3600 
      Width           =   300 
   End 
   Begin VB.PictureBox T1  
      Appearance      =   0  'Flat 
      BackColor       =   &H80000005& 
      BorderStyle     =   0  'None 
      ForeColor       =   &H80000008& 
      Height          =   300 
      Left            =   360 
      Picture         =   "GoodBye.frx":1377 
      ScaleHeight     =   20 
      ScaleMode       =   3  'Pixel 
      ScaleWidth      =   20 
      TabIndex        =   5 
      Top             =   3600 
      Width           =   300 
   End 
   Begin VB.PictureBox FakedForm  
      Appearance      =   0  'Flat 
      BackColor       =   &H80000005& 
      BorderStyle     =   0  'None 
      ForeColor       =   &H80000008& 
      Height          =   3435 
      Left            =   0 
      Picture         =   "GoodBye.frx":180B 
      ScaleHeight     =   229 
      ScaleMode       =   3  'Pixel 
      ScaleWidth      =   326 
      TabIndex        =   0 
      Top             =   0 
      Width           =   4890 
      Begin VB.PictureBox Pioneer  
         Appearance      =   0  'Flat 
         BackColor       =   &H80000005& 
         BorderStyle     =   0  'None 
         ForeColor       =   &H80000008& 
         Height          =   300 
         Left            =   45 
         Picture         =   "GoodBye.frx":219F 
         ScaleHeight     =   20 
         ScaleMode       =   3  'Pixel 
         ScaleWidth      =   20 
         TabIndex        =   10 
         Top             =   45 
         Width           =   300 
         Visible         =   0   'False 
      End 
      Begin VB.PictureBox Walker  
         Appearance      =   0  'Flat 
         BackColor       =   &H80000005& 
         BorderStyle     =   0  'None 
         ForeColor       =   &H80000008& 
         Height          =   300 
         Left            =   4200 
         Picture         =   "GoodBye.frx":2633 
         ScaleHeight     =   20 
         ScaleMode       =   3  'Pixel 
         ScaleWidth      =   20 
         TabIndex        =   4 
         ToolTipText     =   "Beware of Me" 
         Top             =   45 
         Width           =   300 
         Visible         =   0   'False 
      End 
      Begin VB.PictureBox ExitX  
         Appearance      =   0  'Flat 
         BackColor       =   &H80000005& 
         BorderStyle     =   0  'None 
         ForeColor       =   &H80000008& 
         Height          =   240 
         Left            =   4545 
         Picture         =   "GoodBye.frx":2AC7 
         ScaleHeight     =   16 
         ScaleMode       =   3  'Pixel 
         ScaleWidth      =   16 
         TabIndex        =   3 
         ToolTipText     =   "Close me on clicking" 
         Top             =   120 
         Width           =   240 
      End 
      Begin VB.PictureBox Compadre  
         Appearance      =   0  'Flat 
         BackColor       =   &H80000005& 
         BorderStyle     =   0  'None 
         ForeColor       =   &H80000008& 
         Height          =   3000 
         Left            =   45 
         Picture         =   "GoodBye.frx":2F28 
         ScaleHeight     =   200 
         ScaleMode       =   3  'Pixel 
         ScaleWidth      =   320 
         TabIndex        =   1 
         Top             =   390 
         Width           =   4800 
         Begin VB.Label Ending  
            AutoSize        =   -1  'True 
            BackStyle       =   0  'Transparent 
            BorderStyle     =   1  'Fixed Single 
            Caption         =   "END" 
            ForeColor       =   &H0000FFFF& 
            Height          =   255 
            Left            =   2640 
            TabIndex        =   2 
            ToolTipText     =   "Almost near the ending of program. Only a click away !" 
            Top             =   2640 
            Width           =   405 
            Visible         =   0   'False 
         End 
      End 
   End 
End 
Attribute VB_Name = "GoodBye" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
DefInt A-Z 
Const MelodyEnding = "Rummet~1.mid" 
Dim Music As Boolean 
Dim Path As String 
 
Private Sub Delay(sbDT!) 
Dim sbstart!, sbFinish! 
If sbDT! = 0! Then Exit Sub 
sbstart! = Timer 
If (sbstart! + sbDT!) > 86400 Then 
  sbFinish! = ((sbstart! + sbDT!) - 86400) 
  Do While Timer >= sbstart! Or Timer <= sbFinish!: Loop 
Else 
  Do While Timer <= (sbstart! + sbDT!): Loop 
End If 
End Sub 
 
 
Private Sub Ending_Click() 
CCS_Play.Orchestra.Stop 
Unload CCS_Play 
Unload Me 
End 
End Sub 
 
Private Sub Ending_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 
Ending.ToolTipText = "Almost near the ending of program. Only a click away !" 
End Sub 
 
Private Sub Finale_Timer() 
Static Beenhere As Boolean 
Static Sec As Long 
Const FileLenght = 259# ' 
 
'CCS_Play.Orchestra.CurrentPosition shows secs 
 
If CCS_Play.Orchestra.CurrentPosition >= FileLenght Then 
Ending_Click 
End If 
 
If Beenhere = False Then 
If Sec = 20 Then 
Ending.Visible = True 
Beenhere = True 
End If 
End If 
 
Sec = Sec + 1 
 
End Sub 
 
Private Sub ExitX_Click() 
Ending_Click 
End Sub 
 
Private Sub Form_Load() 
Path = App.Path 
If Right$(Path, 1) <> "\" Then Path = Path + "\" 
Me.Show 
CCS_Play.Orchestra.filename = Path & MelodyEnding 
CCS_Play.Orchestra.Play 
Finale.Enabled = True 
PresentWalker 
End Sub 
 
Sub PresentWalker() 
Dim X As Integer 
Dim HurkleStep As Integer 
Music = True 
Walker.Left = 280 
Walker.Top = 3 
Walker.Visible = True 
Pioneer.Visible = True 
Do 
DoEvents 
For X = 280 To 151 Step -2 
DoEvents 
  If HurkleStep = 0 Then 
      Pioneer.Picture = T1.Picture 
      Walker.Picture = T1.Picture 
      Walker.Move X, 3 
      Delay 0.5 
      HurkleStep = 1 
    ElseIf HurkleStep = 1 Then 
      Pioneer.Picture = T2.Picture 
      Walker.Picture = T2.Picture 
      Walker.Move X, 3 
      Delay 0.5 
      HurkleStep = 0 
  End If 
Next X 
       
  Pioneer.Picture = T5.Picture 
  Walker.Picture = T5.Picture 
  Walker.Move X, 3 
 
For X = 151 To 280 Step 2 
DoEvents 
  If HurkleStep = 0 Then 
      Pioneer.Picture = T3.Picture 
      Walker.Picture = T3.Picture 
      Walker.Move X, 3 
      Delay 0.5 
      HurkleStep = 1 
    ElseIf HurkleStep = 1 Then 
      Pioneer.Picture = T4.Picture 
      Walker.Picture = T4.Picture 
      Walker.Move X, 3 
      Delay 0.5 
      HurkleStep = 0 
  End If 
Next X 
Loop 
End Sub