home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Solo_Yahtz2172971162010.psc / AboutScrn.frm < prev    next >
Text File  |  2010-01-11  |  3KB  |  115 lines

  1. VERSION 5.00
  2. Begin VB.Form AboutScrn 
  3.    BorderStyle     =   0  'None
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   3000
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   6345
  9.    LinkTopic       =   "Form1"
  10.    Picture         =   "AboutScrn.frx":0000
  11.    ScaleHeight     =   3000
  12.    ScaleWidth      =   6345
  13.    ShowInTaskbar   =   0   'False
  14.    StartUpPosition =   1  'CenterOwner
  15.    Begin VB.Timer Timer1 
  16.       Enabled         =   0   'False
  17.       Interval        =   1
  18.       Left            =   5640
  19.       Top             =   240
  20.    End
  21. End
  22. Attribute VB_Name = "AboutScrn"
  23. Attribute VB_GlobalNameSpace = False
  24. Attribute VB_Creatable = False
  25. Attribute VB_PredeclaredId = True
  26. Attribute VB_Exposed = False
  27. Dim X(1000), Y(1000), Z(1000) As Integer
  28. Dim tmpX(1000), tmpY(1000), tmpZ(1000) As Integer
  29. Dim K As Integer
  30. Dim Zoom As Integer
  31. Dim Speed As Integer
  32. Dim DrSty As Integer
  33. Dim ExitView As Boolean
  34. Dim Density As Integer
  35. Dim JustStarted As Boolean
  36.  
  37. Private Sub Form_Click()
  38.     If JustStarted = True Then
  39.         JustStarted = False
  40.         Exit Sub
  41.     End If
  42.     If Timer1.Enabled = False Then
  43.         Unload Me
  44.         Exit Sub
  45.     End If
  46.     ExitView = True
  47.     For i = 0 To 100
  48.         AboutScrn.DrawMode = DrSty
  49.         Me.Circle (tmpX(i), tmpY(i)), DrSty, BackColor
  50.     Next
  51. End Sub
  52.  
  53. Private Sub Form_Load()
  54. Dim i As Integer
  55.     Density = 200
  56.     DrSty = 6
  57.     AboutScrn.DrawMode = DrSty
  58.     ExitView = False
  59.     Me.Refresh
  60.     Me.AutoRedraw = True
  61.     Speed = -3  '   <-----------------  (Range = -1 to -50)
  62.     K = 2038
  63.     Zoom = 256
  64.     Timer1.Interval = 1
  65.     For i = 0 To 1000
  66.         X(i) = Int(Rnd * 1024) - 512
  67.         Y(i) = Int(Rnd * 1024) - 512
  68.         Z(i) = Int(Rnd * 512) - 256
  69.         tmpX(i) = 0
  70.         tmpY(i) = 0
  71.         tmpZ(i) = 0
  72.     Next i
  73.     JustStarted = False
  74.     If frmMain.mnuSound.Checked = True Then
  75.         JustStarted = False
  76.         Timer1.Enabled = True
  77.     End If
  78. End Sub
  79.  
  80. Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  81.     If Button = 2 Then
  82.         If Timer1.Enabled = False Then
  83.             Timer1.Enabled = True
  84.             JustStarted = True
  85.         End If
  86.     End If
  87. End Sub
  88.  
  89. Private Sub Timer1_Timer()
  90. Dim i As Integer
  91. Dim Radius As Integer
  92. Dim StarColor As Integer
  93.     If ExitView Then GoTo Rexx
  94.     For i = 0 To Density
  95.         AboutScrn.DrawMode = DrSty
  96.         Me.Circle (tmpX(i), tmpY(i)), DrSty - 1, BackColor
  97.         Z(i) = Z(i) + Speed
  98.         If Z(i) > 255 Then Z(i) = -255
  99.         If Z(i) < -255 Then Z(i) = 255
  100.         tmpZ(i) = Z(i) + Zoom
  101.         tmpX(i) = (X(i) * K / tmpZ(i)) + (AboutScrn.Width / 2)
  102.         tmpY(i) = (Y(i) * K / tmpZ(i)) + (AboutScrn.Height / 2)
  103.         Radius = 1
  104.         StarColor = 256 - Z(i)
  105.         Me.Circle (tmpX(i), tmpY(i)), DrSty - 1, RGB(StarColor, StarColor, StarColor)
  106.         If ExitView = True Then
  107.             GoTo Rexx
  108.         End If
  109.     Next
  110.     Exit Sub
  111. Rexx:
  112.     Timer1.Enabled = False
  113.     Unload Me
  114. End Sub
  115.