Important alert: (current site time 7/16/2013 1:39:11 AM EDT)
 

VB icon

*Improved* GoAway Screen Wipe

Email
Submitted on: 5/25/1999
By: Jono Spiro  
Level: Not Given
User Rating: By 38 Users
Compatibility: VB 5.0, VB 6.0
Views: 10893
 
     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!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' 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
'
' Inputs:'Screenwipe form to wipe, speed
'example: screenwipe form1,100
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=1877&lngWId=1'for details.'**************************************

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 10 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
3/19/2001 8:37:16 AMalex m-g

Great code. Very fast. Will slow down if your forms have a Form_Paint() sub procedure (eg. to tile an image over the form).
(If this comment was disrespectful, please report it.)

 
5/20/2002 11:20:52 AMMike

Why do you have this function i seriously see no point not to mention you could have better code by having a arguement in your funx such as formHwnd as long, or get the form id.

Just a suggestion keep codding.
(If this comment was disrespectful, please report it.)

 
9/25/2002 9:02:18 PM

Why would you make a function? its just more code to use but ur getting there
(If this comment was disrespectful, please report it.)

 
8/29/2007 9:55:29 AMmugiwara

great.... its a good code..... keep it going
(If this comment was disrespectful, please report it.)

 

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.