Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. Public Class Loading
  3.     Public Class GlobalVariables
  4.         Public Shared iR As Long
  5.         Public Shared iG As Long
  6.         Public Shared iB As Long
  7.         Public Shared intStageNum As Long
  8.     End Class
  9.  
  10.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  11.         GlobalVariables.iR = 255
  12.         GlobalVariables.iG = 0
  13.         GlobalVariables.iB = 0
  14.     End Sub
  15.  
  16.     Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  17.         Select Case GlobalVariables.intStageNum
  18.             Case 0      'To change from Red to Yellow, just Green needs to go from 0 to 255 so we do this
  19.                GlobalVariables.iG = GlobalVariables.iG + 1
  20.                 If GlobalVariables.iG = 255 Then GlobalVariables.intStageNum = GlobalVariables.intStageNum + 1
  21.             Case 1      'we are now at (255, 255, 0) yellow, to go to green we need to reduce red to 0
  22.                GlobalVariables.iR = GlobalVariables.iR - 1
  23.                 If GlobalVariables.iR = 0 Then GlobalVariables.intStageNum = GlobalVariables.intStageNum + 1
  24.             Case 2      'now at (0, 255, 0)... to go to Cyan we need to go B to 255
  25.                GlobalVariables.iB = GlobalVariables.iB + 1
  26.                 If GlobalVariables.iB = 255 Then GlobalVariables.intStageNum = GlobalVariables.intStageNum + 1
  27.             Case 3      'now at (0, 255, 255)... for blue reduce green to 0
  28.                GlobalVariables.iG = GlobalVariables.iG - 1
  29.                 If GlobalVariables.iG = 0 Then GlobalVariables.intStageNum = GlobalVariables.intStageNum + 1
  30.             Case 4      'now at (0, 0, 255)... for magenta increase red to 255
  31.                GlobalVariables.iR = GlobalVariables.iR + 1
  32.                 If GlobalVariables.iR = 255 Then GlobalVariables.intStageNum = GlobalVariables.intStageNum + 1
  33.             Case 5      'now at (255, 0, 255)... and back to red reduce B to 0
  34.                GlobalVariables.iB = GlobalVariables.iB - 1
  35.                 If GlobalVariables.iB = 0 Then GlobalVariables.intStageNum = GlobalVariables.intStageNum + 1
  36.             Case Else
  37.                 GlobalVariables.intStageNum = 0
  38.         End Select
  39.  
  40.         Me.BackColor = Color.FromArgb(GlobalVariables.iR, GlobalVariables.iG, GlobalVariables.iB) ' set form background
  41.  
  42.     End Sub
  43.  
  44.     Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
  45.         Label1.Text = Val(Label1.Text + 1)
  46.         Dim step1 As Long = Val(Val(Label1.Text - 0) * 1)
  47.         Dim step2 As Long = Val(Val(Label1.Text - 15) * 3)
  48.         Dim step3 As Long = Val(Val(Label1.Text - 30) * 4)
  49.         Dim step4 As Long = Val(Val(Label1.Text - 40) * 6)
  50.  
  51.  
  52.         If Label1.Text >= 0 Then
  53.             Label2.Text = "fetching.... " & step1 & "%"
  54.             If step1 >= 100 Then
  55.                 Label2.Text = "fetching.... " & "100" & "%"
  56.             End If
  57.         End If
  58.         If Label1.Text >= 15 Then
  59.             Label2.Text = "clearing browser history.... " & step2 & "%"
  60.             If step2 >= 100 Then
  61.                 Label2.Text = "clearing browser history.... " & "100" & "%"
  62.             End If
  63.         End If
  64.         If Label1.Text >= 45 Then
  65.             Label2.Text = "eating your cereal.... " & step3 & "%"
  66.             If step3 >= 100 Then
  67.                 Label2.Text = "eating your cereal.... " & "100" & "%"
  68.             End If
  69.         End If
  70.         If Label1.Text >= 40 Then
  71.             Label2.Text = "deleting system32.... " & step4 & "%"
  72.             If step4 >= 100 Then
  73.                 Label2.Text = "enjoy your stay.... " & "100" & "%"
  74.             End If
  75.         End If
  76.  
  77.  
  78.         If Label1.Text = 70 Then
  79.             Form2.Show()
  80.             Me.Close()
  81.         End If
  82.  
  83.  
  84.     End Sub
  85. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement