home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form2
- BorderStyle = 4 'Fixed ToolWindow
- Caption = "Form Preview"
- ClientHeight = 2415
- ClientLeft = 45
- ClientTop = 285
- ClientWidth = 3255
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2415
- ScaleWidth = 3255
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton Command1
- Caption = "Shutdown"
- Height = 255
- Left = 120
- TabIndex = 1
- Top = 2040
- Width = 3015
- End
- Begin VB.Timer Timer2
- Enabled = 0 'False
- Interval = 1
- Left = 2280
- Top = 0
- End
- Begin VB.Timer Timer1
- Interval = 1
- Left = 2760
- Top = 0
- End
- Begin VB.Label Label1
- Caption = $"Form2.frx":0000
- Height = 1815
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 3015
- End
- Attribute VB_Name = "Form2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim Xtra1 As Long
- Dim Xtra2 As Long
- Dim Xtra3 As Long
- Dim Xtra4 As Long
- Dim Xtra5 As Long
- Dim Start As Boolean
- Dim Amount As Integer
- Dim Ricochet As Boolean
- Dim CurPos As Integer
- Private Sub Command1_Click()
- Start = True
- Timer1.Enabled = False
- Timer2.Enabled = True
- End Sub
- Private Sub Form_Activate()
- Form2.Width = NormalW
- Form2.Height = NormalH
- Form2.Move (Screen.Width - Form2.Width) / 2, (Screen.Height - Form2.Height) / 2
- Xtra1 = Form2.Width
- Xtra2 = Form2.Height
- Xtra3 = Form2.Left
- Xtra4 = Form2.Top
- Start = True
- Timer1.Enabled = True
- End Sub
- Private Sub Form_Load()
- NormalW = Form2.Width
- NormalH = Form2.Height
- Xtra1 = Form2.Width
- Xtra2 = Form2.Height
- Xtra3 = Form2.Left
- Xtra4 = Form2.Top
- Start = True
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Cancel = 1
- Command1_Click
- End Sub
- Private Sub Timer1_Timer()
- If Startup = 1 Then
- 'Zoom In
- If Start = True Then
- Form2.Width = 0
- Form2.Height = 0
- Start = False
- End If
- Amount = 75
- Form2.Move (Screen.Width - Form2.Width) / 2, (Screen.Height - Form2.Height) / 2
- If Form2.Width + Amount > Xtra1 And Form2.Height + Amount > Xtra2 Then
- Form2.Width = Xtra1
- Form2.Height = Xtra2
- GoTo EndE
- ElseIf Form2.Width + Amount > Xtra1 Then
- Form2.Width = Xtra1
- Form2.Height = Form2.Height + Amount
- ElseIf Form2.Height + Amount > Xtra2 Then
- Form2.Height = Xtra2
- Form2.Width = Form2.Width + Amount
- Else
- Form2.Height = Form2.Height + Amount
- Form2.Width = Form2.Width + Amount
- End If
- Form2.Move (Screen.Width - Form2.Width) / 2, (Screen.Height - Form2.Height) / 2
- ElseIf Startup = 2 Then
- 'Zoom Out
- If Start = True Then
- Form2.Width = Screen.Width
- Form2.Height = Screen.Height
- Form2.Left = 0
- Form2.Top = 0
- Start = False
- End If
- Amount = 100
- Form2.Move (Screen.Width - Form2.Width) / 2, (Screen.Height - Form2.Height) / 2
- If Form2.Width - Amount < Xtra1 And Form2.Height - Amount < Xtra2 Then
- Form2.Width = Xtra1
- Form2.Height = Xtra2
- GoTo EndE
- ElseIf Form2.Width - Amount < Xtra1 Then
- Form2.Width = Xtra1
- Form2.Height = Form2.Height - Amount
- ElseIf Form2.Height - Amount < Xtra2 Then
- Form2.Height = Xtra2
- Form2.Width = Form2.Width - Amount
- Else
- Form2.Height = Form2.Height - Amount
- Form2.Width = Form2.Width - Amount
- End If
- Form2.Move (Screen.Width - Form2.Width) / 2, (Screen.Height - Form2.Height) / 2
- ElseIf Startup = 3 Then
- 'Slide Left
- Amount = 75
- If Start = True Then
- Form2.Left = Screen.Width
- Start = False
- End If
- If Form2.Left - Amount < (Screen.Width - Form2.Width) / 2 Then
- Form2.Left = (Screen.Width - Form2.Width) / 2
- GoTo EndE
- Else
- Form2.Left = Form2.Left - Amount
- End If
- ElseIf Startup = 4 Then
- 'Slide Up
- Amount = 75
- If Start = True Then
- Form2.Top = Screen.Height
- Start = False
- End If
- If Form2.Top - Amount < (Screen.Height - Form2.Height) / 2 Then
- Form2.Top = (Screen.Height - Form2.Height) / 2
- GoTo EndE
- Else
- Form2.Top = Form2.Top - Amount
- End If
- ElseIf Startup = 5 Then
- 'Slide Right
- Amount = 75
- If Start = True Then
- Form2.Left = 0 - Form2.Width
- Start = False
- End If
- If Form2.Left + Amount > (Screen.Width - Form2.Width) / 2 Then
- Form2.Left = (Screen.Width - Form2.Width) / 2
- GoTo EndE
- Else
- Form2.Left = Form2.Left + Amount
- End If
- ElseIf Startup = 6 Then
- 'Slide Down
- Amount = 75
- If Start = True Then
- Form2.Top = 0 - Form2.Height
- Start = False
- End If
- If Form2.Top + Amount > (Screen.Height - Form2.Height) / 2 Then
- Form2.Top = (Screen.Height - Form2.Height) / 2
- GoTo EndE
- Else
- Form2.Top = Form2.Top + Amount
- End If
- ElseIf Startup = 7 Then
- 'Bounce Left
- If Start = True Then
- Form2.Left = Screen.Width
- Form2.Top = 0
- Ricochet = False
- Start = False
- Amount = 300
- End If
- If Ricochet = False Then
- If Form2.Left < 0 Then
- Ricochet = True
- Else
- Form2.Left = Form2.Left - Amount
- Form2.Top = Form2.Top + (Amount / 8)
- End If
- Else
- If Form2.Left + Amount > (Screen.Width - Form2.Width) / 2 Then
- Form2.Left = (Screen.Width - Form2.Width) / 2
- GoTo EndE
- Else
- Amount = 150
- Form2.Left = Form2.Left + Amount
- Form2.Top = Form2.Top + (Amount / 3)
- End If
- End If
- ElseIf Startup = 8 Then
- 'Bounce Right
- If Start = True Then
- Form2.Left = 0
- Form2.Top = Screen.Height - Form2.Height
- Ricochet = False
- Start = False
- Amount = 300
- End If
- If Ricochet = False Then
- If Form2.Left > Screen.Width - Form2.Width Then
- Ricochet = True
- Else
- Form2.Left = Form2.Left + Amount
- Form2.Top = Form2.Top - (Amount / 8)
- End If
- Else
- If Form2.Left - Amount < (Screen.Width - Form2.Width) / 2 Then
- Form2.Left = (Screen.Width - Form2.Width) / 2
- GoTo EndE
- Else
- Amount = 150
- Form2.Left = Form2.Left - Amount
- Form2.Top = Form2.Top - (Amount / 2)
- End If
- End If
- ElseIf Startup = 9 Then
- 'Up/Down
- Amount = 400
- If Start = True Then
- CurPos = 1
- Start = False
- Ricochet = True
- End If
- If Ricochet = False Then
- If CurPos = 2 And Form2.Top + Amount > (Screen.Height - Form2.Height) / 2 Then
- GoTo EndE
- Else
- If Form2.Top + Form2.Height > Screen.Height Then
- CurPos = CurPos + 1
- Ricochet = True
- Else
- Form2.Top = Form2.Top + Amount
- End If
- End If
- Else
- If Form2.Top < 0 Then
- Ricochet = False
- Else
- Form2.Top = Form2.Top - Amount
- End If
- End If
- ElseIf Startup = 10 Then
- 'Left/Right
- Amount = 400
- If Start = True Then
- CurPos = 1
- Start = False
- Ricochet = True
- End If
- If Ricochet = False Then
- If CurPos = 2 And Form2.Left + Amount > (Screen.Width - Form2.Width) / 2 Then
- GoTo EndE
- Else
- If Form2.Left + Form2.Width > Screen.Width Then
- CurPos = CurPos + 1
- Ricochet = True
- Else
- Form2.Left = Form2.Left + Amount
- End If
- End If
- Else
- If Form2.Left < 0 Then
- Ricochet = False
- Else
- Form2.Left = Form2.Left - Amount
- End If
- End If
- ElseIf Startup = 11 Then
- 'Left-Up
- Xtra5 = 50
- If Start = True Then
- Form2.Top = Screen.Height
- Form2.Left = Screen.Width
- Start = False
- End If
- If Form2.Left - ((Screen.Width - Form2.Width) / 2) / Xtra5 < (Screen.Width - Form2.Width) / 2 And Form2.Top - ((Screen.Height - Form2.Height) / 2) / Xtra5 < (Screen.Height - Form2.Height) / 2 Then
- Form2.Left = (Screen.Width - Form2.Width) / 2
- Form2.Top = (Screen.Height - Form2.Height) / 2
- GoTo EndE
- Else
- Amount = ((Screen.Width - Form2.Width) / 2) / Xtra5
- Form2.Left = Form2.Left - Amount
- Amount = ((Screen.Height - Form2.Height) / 2) / Xtra5
- Form2.Top = Form2.Top - Amount
- End If
- ElseIf Startup = 12 Then
- 'Left-Down
- Xtra5 = 50
- If Start = True Then
- Form2.Top = 0 - Form2.Height
- Form2.Left = Screen.Width
- Start = False
- End If
- If Form2.Left - ((Screen.Width - Form2.Width) / 2) / Xtra5 < (Screen.Width - Form2.Width) / 2 And Form2.Top + ((Screen.Height - Form2.Height) / 2) / Xtra5 > (Screen.Height - Form2.Height) / 2 Then
- Form2.Left = (Screen.Width - Form2.Width) / 2
- Form2.Top = (Screen.Height - Form2.Height) / 2
- GoTo EndE
- Else
- Amount = ((Screen.Width - Form2.Width) / 2) / Xtra5
- Form2.Left = Form2.Left - Amount
- Amount = ((Screen.Height - Form2.Height) / 2) / Xtra5
- Form2.Top = Form2.Top + Amount
- End If
- ElseIf Startup = 13 Then
- 'Right-Up
- Xtra5 = 50
- If Start = True Then
- Form2.Top = Screen.Height
- Form2.Left = 0 - Form2.Width
- Start = False
- End If
- If Form2.Left + ((Screen.Width - Form2.Width) / 2) / Xtra5 > (Screen.Width - Form2.Width) / 2 And Form2.Top - ((Screen.Height - Form2.Height) / 2) / Xtra5 < (Screen.Height - Form2.Height) / 2 Then
- Form2.Left = (Screen.Width - Form2.Width) / 2
- Form2.Top = (Screen.Height - Form2.Height) / 2
- GoTo EndE
- Else
- Amount = ((Screen.Width - Form2.Width) / 2) / Xtra5
- Form2.Left = Form2.Left + Amount
- Amount = ((Screen.Height - Form2.Height) / 2) / Xtra5
- Form2.Top = Form2.Top - Amount
- End If
- ElseIf Startup = 14 Then
- 'Right-Down
- Xtra5 = 50
- If Start = True Then
- Form2.Top = 0 - Form2.Height
- Form2.Left = 0 - Form2.Width
- Start = False
- End If
- If Form2.Left + ((Screen.Width - Form2.Width) / 2) / Xtra5 > (Screen.Width - Form2.Width) / 2 And Form2.Top + ((Screen.Height - Form2.Height) / 2) / Xtra5 > (Screen.Height - Form2.Height) / 2 Then
- Form2.Left = (Screen.Width - Form2.Width) / 2
- Form2.Top = (Screen.Height - Form2.Height) / 2
- GoTo EndE
- Else
- Amount = ((Screen.Width - Form2.Width) / 2) / Xtra5
- Form2.Left = Form2.Left + Amount
- Amount = ((Screen.Height - Form2.Height) / 2) / Xtra5
- Form2.Top = Form2.Top + Amount
- End If
- End If
- Exit Sub
- EndE:
- Timer1.Enabled = False
- End Sub
- Private Sub Timer2_Timer()
- If Shutdown = 1 Then
- 'Zoom In
- If Start = True Then
- Form2.Width = Screen.Width
- Form2.Height = Screen.Height
- Form2.Left = 0
- Form2.Top = 0
- Start = False
- End If
- Amount = 100
- Form2.Move (Screen.Width - Form2.Width) / 2, (Screen.Height - Form2.Height) / 2
- If Screen.Width - 1 < Form2.Width And Screen.Height - 1 < Form2.Height Then
- GoTo EndE
- ElseIf Screen.Width - 1 < Form2.Width Then
- Form2.Width = Screen.Width
- Form2.Height = Form2.Height + Amount
- ElseIf Screen.Height - 1 < Form2.Height Then
- Form2.Height = Screen.Height
- Form2.Width = Form2.Width + Amount
- Else
- Form2.Height = Form2.Height + Amount
- Form2.Width = Form2.Width + Amount
- End If
- Form2.Move (Screen.Width - Form2.Width) / 2, (Screen.Height - Form2.Height) / 2
- ElseIf Shutdown = 2 Then
- 'Zoom Out
- Amount = 75
- Form2.Move (Screen.Width - Form2.Width) / 2, (Screen.Height - Form2.Height) / 2
- If Form2.Width = 375 And Form2.Height = 405 Then
- GoTo EndE
- ElseIf Form2.Width = 375 Then
- Form2.Height = Form2.Height - Amount
- ElseIf Form2.Height = 405 Then
- Form2.Width = Form2.Width - Amount
- Else
- Form2.Height = Form2.Height - Amount
- Form2.Width = Form2.Width - Amount
- End If
- Form2.Move (Screen.Width - Form2.Width) / 2, (Screen.Height - Form2.Height) / 2
- ElseIf Shutdown = 3 Then
- 'Slide Left
- Amount = 75
- If (Form2.Left + Form2.Width) - Amount < 0 Then
- GoTo EndE
- Else
- Form2.Left = Form2.Left - Amount
- End If
- ElseIf Shutdown = 4 Then
- 'Slide Up
- Amount = 75
- If (Form2.Top + Form2.Height) - Amount < 0 Then
- GoTo EndE
- Else
- Form2.Top = Form2.Top - Amount
- End If
- ElseIf Shutdown = 5 Then
- 'Slide Right
- Amount = 75
- If Form2.Left + Amount > Screen.Width Then
- GoTo EndE
- Else
- Form2.Left = Form2.Left + Amount
- End If
- ElseIf Shutdown = 6 Then
- 'Slide Down
- Amount = 75
- If Form2.Top + Amount > Screen.Height Then
- GoTo EndE
- Else
- Form2.Top = Form2.Top + Amount
- End If
- ElseIf Shutdown = 7 Then
- 'Bounce Left
- If Start = True Then
- Ricochet = True
- Start = False
- Amount = 300
- End If
- If Ricochet = False Then
- If Form2.Top < 1 And Form2.Left + Amount > Screen.Width Then
- GoTo EndE
- Else
- Form2.Left = Form2.Left + Amount
- Form2.Top = Form2.Top - (Amount / 8)
- End If
- Else
- If Form2.Left < 0 Then
- Ricochet = False
- Else
- Amount = 150
- Form2.Left = Form2.Left - Amount
- Form2.Top = Form2.Top - (Amount / 3)
- End If
- End If
- ElseIf Shutdown = 8 Then
- 'Bounce Right
- If Start = True Then
- Ricochet = True
- Start = False
- Amount = 300
- End If
- If Ricochet = False Then
- If Form2.Left < 0 - Form2.Width And Form2.Top + Form2.Height > Screen.Height - 1 Then
- GoTo EndE
- Else
- Form2.Left = Form2.Left - Amount
- Form2.Top = Form2.Top + (Amount / 8)
- End If
- Else
- If Form2.Left + Form2.Width > Screen.Width - 1 Then
- Ricochet = False
- Else
- Amount = 150
- Form2.Left = Form2.Left + Amount
- Form2.Top = Form2.Top + (Amount / 2)
- End If
- End If
- ElseIf Shutdown = 9 Then
- 'Up/Down
- Amount = 400
- If Start = True Then
- CurPos = 1
- Form2.Top = 0
- Start = False
- Ricochet = False
- End If
- If Ricochet = False Then
- If CurPos = 2 And Form2.Top + Amount > (Screen.Height - Form2.Height) / 2 Then
- Form2.Top = (Screen.Height - Form2.Height) / 2
- GoTo EndE
- Else
- If Form2.Top + Form2.Height > Screen.Height Then
- CurPos = CurPos + 1
- Ricochet = True
- Else
- Form2.Top = Form2.Top + Amount
- End If
- End If
- Else
- If Form2.Top < 0 Then
- Ricochet = False
- Else
- Form2.Top = Form2.Top - Amount
- End If
- End If
- ElseIf Shutdown = 10 Then
- 'Left/Right
- Amount = 400
- If Start = True Then
- CurPos = 1
- Form2.Left = 0
- Start = False
- Ricochet = False
- End If
- If Ricochet = False Then
- If CurPos = 2 And Form2.Left + Amount > (Screen.Width - Form2.Width) / 2 Then
- Form2.Left = (Screen.Width - Form2.Width) / 2
- GoTo EndE
- Else
- If Form2.Left + Form2.Width > Screen.Width Then
- CurPos = CurPos + 1
- Ricochet = True
- Else
- Form2.Left = Form2.Left + Amount
- End If
- End If
- Else
- If Form2.Left < 0 Then
- Ricochet = False
- Else
- Form2.Left = Form2.Left - Amount
- End If
- End If
- ElseIf Shutdown = 11 Then
- 'Left-Up
- Xtra5 = 50
- If Form2.Left + Form2.Width < 1 And Form2.Top + Form2.Height < 1 Then
- GoTo EndE
- Else
- Amount = ((Screen.Width - Form2.Width) / 2) / Xtra5
- Form2.Left = Form2.Left - Amount
- Amount = ((Screen.Height - Form2.Height) / 2) / Xtra5
- Form2.Top = Form2.Top - Amount
- End If
- ElseIf Shutdown = 12 Then
- 'Left-Down
- Xtra5 = 50
- If Form2.Left + Form2.Width < 1 And Form2.Top > Screen.Width - 1 Then
- GoTo EndE
- Else
- Amount = ((Screen.Width - Form2.Width) / 2) / Xtra5
- Form2.Left = Form2.Left - Amount
- Amount = ((Screen.Height - Form2.Height) / 2) / Xtra5
- Form2.Top = Form2.Top + Amount
- End If
- ElseIf Shutdown = 13 Then
- 'Right-Up
- Xtra5 = 50
- If Form2.Left > Screen.Width - 1 And Form2.Top + Form2.Height < 1 Then
- GoTo EndE
- Else
- Amount = ((Screen.Width - Form2.Width) / 2) / Xtra5
- Form2.Left = Form2.Left + Amount
- Amount = ((Screen.Height - Form2.Height) / 2) / Xtra5
- Form2.Top = Form2.Top - Amount
- End If
- ElseIf Shutdown = 14 Then
- 'Right-Down
- Xtra5 = 50
- If Form2.Top > Screen.Height - 1 And Form2.Left > Screen.Width - 1 Then
- GoTo EndE
- Else
- Amount = ((Screen.Width - Form2.Width) / 2) / Xtra5
- Form2.Left = Form2.Left + Amount
- Amount = ((Screen.Height - Form2.Height) / 2) / Xtra5
- Form2.Top = Form2.Top + Amount
- End If
- End If
- Exit Sub
- EndE:
- Form1.Show
- Form1.EndPreview
- Form2.Hide
- Unload Me
- Timer2.Enabled = False
- End Sub
-