VB icon

*Improved* GoAway Screen Wipe

Email
Submitted on: 1/2/2015 7:17:00 AM
By: Jono Spiro (from psc cd)  
Level: Not Given
User Rating: By 38 Users
Compatibility: VB 5.0, VB 6.0
Views: 2017
 
     I just quickly improved this screen wipe function written by Jesse Foster. It runs a bit smoother and is usable as a function for any form. Just drop it into a module. Also, I made it work so that it is 'public' not private.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
'**************************************
' Name: *Improved* GoAway Screen Wipe
' Description:I just quickly improved this screen wipe function written by Jesse Foster.
It runs a bit smoother and is usable as a function for any form. Just drop it into a module. Also, I made it work so that it is 'public' not private.
' By: Jono Spiro (from psc cd)
'
' Inputs:'Screenwipe form to wipe, speed
'example: screenwipe form1,100
'**************************************

Public Function screenWipe(Form As Form, CutSpeed As Integer) As Boolean
 Dim OldWidth As Integer
 Dim OldHeight As Integer
 Form.WindowState = 0
 If CutSpeed <= 0 Then
 MsgBox "You cannot use 0 as a speed value"
 Exit Function
 End If
 Do
 OldWidth = Form.Width
 Form.Width = Form.Width - CutSpeed
 DoEvents
 If Form.Width <> OldWidth Then
Form.Left = Form.Left + CutSpeed / 2
DoEvents
 End If
 OldHeight = Form.Height
 Form.Height = Form.Height - CutSpeed
 DoEvents
 If Form.Height <> OldHeight Then
Form.Top = Form.Top + CutSpeed / 2
DoEvents
 End If
 Loop While Form.Width <> OldWidth Or Form.Height <> OldHeight
 Unload Form
End Function


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.