VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



ImprovedGoAway Screen Wipe

by Jono Spiro (4 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (38 Votes)

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.

Inputs
'Screenwipe form to wipe, speed 'example: screenwipe form1,100

Rate ImprovedGoAway Screen Wipe

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

Download this snippet    Add to My Saved Code

ImprovedGoAway Screen Wipe Comments

No comments have been posted about ImprovedGoAway Screen Wipe. Why not be the first to post a comment about ImprovedGoAway Screen Wipe.

Post your comment

Subject:
Message:
0/1000 characters