VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Earthquake Shake Effect

by jBaron (1 Submission)
Category: Jokes/Humor
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

Makes a form shaking.
<< Earthquake Shake Effect >>

Assumes
My First Code In PSC

Rate Earthquake Shake Effect

'Put this code in a module
'*********************** Author ****************************
'Earthquake Shake Effect
'Author: jBaron
'E-mail Address: [email protected]
'Website: www.hackedemonia.tk
'Dated on: 05-09-2005
'For any problems,suggestions please E-mail me.
'***********************************************************
' In a command button place the above code:
'example: << Call Shake(Form1,1,1000,100) >>
'
'             a)  b) c) d)
'a) Here we call a form.
'
'b) We give the State: 1 for shaking Horizontally,2 for shaking Vertically
'  3 for shaking both Horizonally and Vertically.
'
'c) We give a number to say for How Long the form will be shaking.
'
'd) We give a number to say How Big the effect will be.
'Warning:
' # If You give a large number (Howlong) it wiil take a long time
'  for the effect to pass out and may conflict your program.
' # Same happens with (Howbig).
Public Function Shake(Aform As Form, State As Integer, Howlong As Long, Howbig As Long)
Dim i As Long
If State = 1 Then
  '--> Shakes Form LeftRight...
  For i = 0 To Howlong
    Aform.Left = Aform.Left + Howbig
    Aform.Left = Aform.Left - Howbig
  Next i
End If
If State = 2 Then
  '--> Shakes Form UpDown...
  For i = 0 To Howlong
    Aform.Top = Aform.Top + Howbig
    Aform.Top = Aform.Top - Howbig
  Next i
End If
If State = 3 Then
  '--> Shakes Form UpDown and LeftRight...
  For i = 0 To Howlong
    Aform.Left = Aform.Left + Howbig
    Aform.Left = Aform.Left - Howbig
 
    Aform.Top = Aform.Top + Howbig
    Aform.Top = Aform.Top - Howbig
  Next i
End If
End Function

Download this snippet    Add to My Saved Code

Earthquake Shake Effect Comments

No comments have been posted about Earthquake Shake Effect. Why not be the first to post a comment about Earthquake Shake Effect.

Post your comment

Subject:
Message:
0/1000 characters