Important alert: (current site time 7/16/2013 1:37:32 AM EDT)
 

VB icon

!!!**COOL FORM CLOSER**!!!

Email
Submitted on: 8/11/1999
By: SeeD  
Level: Not Given
User Rating: By 16 Users
Compatibility: VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0
Views: 57878
(About the author)
 
     A REALLY COOL LOOKING FORM CLOSER! THE FORM WIPES UP AND DOWN THE SCREEN! VERY COOL LOOKING! GET THIS RIGHT NOW!
 
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: !!!**COOL FORM CLOSER**!!!
' Description:A REALLY COOL LOOKING FORM CLOSER! THE FORM WIPES UP AND DOWN THE SCREEN! VERY COOL LOOKING! GET THIS RIGHT NOW!
' By: SeeD
'
' Assumes:Follow these instructions.
1) Start up a new project in your VB.
2) Make a Label
3) Add the code below to the label. Done (o:
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=2930&lngWId=1'for details.'**************************************

Private Sub Label1_Click()
Top = (Screen.Height - Width) / 1
Left = (Screen.Width - Height) / 2
Top = (Screen.Height - Width) / 3
Left = (Screen.Width - Height) / 4
Top = (Screen.Height - Width) / 5
Left = (Screen.Width - Height) / 6
Top = (Screen.Height - Width) / 7
Left = (Screen.Width - Height) / 8
Top = (Screen.Height - Width) / 9
Top = (Screen.Height - Width) / 10
Left = (Screen.Width - Height) / 12
Top = (Screen.Height - Width) / 13
Left = (Screen.Width - Height) / 14
Top = (Screen.Height - Width) / 15
Left = (Screen.Width - Height) / 16
Top = (Screen.Height - Width) / 17
Left = (Screen.Width - Height) / 18
Top = (Screen.Height - Width) / 19
Left = (Screen.Width - Height) / 20
Top = (Screen.Height - Width) / 21
Left = (Screen.Width - Height) / 22
Top = (Screen.Height - Width) / 23
Left = (Screen.Width - Height) / 24
Top = (Screen.Height - Width) / 25
Left = (Screen.Width - Height) / 26
Top = (Screen.Height - Width) / 27
Left = (Screen.Width - Height) / 28
Top = (Screen.Height - Width) / 29
Left = (Screen.Width - Height) / 30
Top = (Screen.Height - Width) / 31
Left = (Screen.Width - Height) / 32
Top = (Screen.Height - Width) / 31
Top = (Screen.Height - Width) / 30
Left = (Screen.Width - Height) / 29
Top = (Screen.Height - Width) / 28
Left = (Screen.Width - Height) / 27
Top = (Screen.Height - Width) / 26
Left = (Screen.Width - Height) / 25
Top = (Screen.Height - Width) / 24
Left = (Screen.Width - Height) / 23
Top = (Screen.Height - Width) / 22
Top = (Screen.Height - Width) / 21
Left = (Screen.Width - Height) / 20
Top = (Screen.Height - Width) / 19
Left = (Screen.Width - Height) / 18
Top = (Screen.Height - Width) / 17
Left = (Screen.Width - Height) / 16
Top = (Screen.Height - Width) / 15
Left = (Screen.Width - Height) / 14
Top = (Screen.Height - Width) / 13
Left = (Screen.Width - Height) / 12
Top = (Screen.Height - Width) / 11
Left = (Screen.Width - Height) / 10
Top = (Screen.Height - Width) / 9
Left = (Screen.Width - Height) / 8
Top = (Screen.Height - Width) / 7
Left = (Screen.Width - Height) / 6
Top = (Screen.Height - Width) / 5
Left = (Screen.Width - Height) / 4
Top = (Screen.Height - Width) / 3
Left = (Screen.Width - Height) / 2
Top = (Screen.Width + Height) / 2
Left = (Screen.Height + Width) / 3
Top = (Screen.Width + Height) / 4
Left = (Screen.Height + Width) / 5
Top = (Screen.Width + Height) / 6
Left = (Screen.Height + Width) / 7
Top = (Screen.Width + Height) / 8
Left = (Screen.Height + Width) / 9
Top = (Screen.Width + Height) / 10
Left = (Screen.Height + Width) / 11
Top = (Screen.Width + Height) / 12
Left = (Screen.Height + Width) / 13
Top = (Screen.Width + Height) / 14
Left = (Screen.Height + Width) / 15
Top = (Screen.Width + Height) / 16
Left = (Screen.Height + Width) / 17
Top = (Screen.Width + Height) / 18
Left = (Screen.Height + Width) / 19
Top = (Screen.Width + Height) / 20
Left = (Screen.Height + Width) / 21
Top = (Screen.Width + Height) / 22
Left = (Screen.Height + Width) / 23
Top = (Screen.Width + Height) / 24
Left = (Screen.Height + Width) / 25
Top = (Screen.Width + Height) / 26
Left = (Screen.Height + Width) / 27
Top = (Screen.Width + Height) / 28
Left = (Screen.Height + Width) / 29
Top = (Screen.Width + Height) / 30
Left = (Screen.Height + Width) / 31
Top = (Screen.Width + Height) / 32
Left = (Screen.Height + Left) / 31
Top = (Screen.Width + Top) / 30
Left = (Screen.Height + Left) / 29
Top = (Screen.Width + Top) / 28
Left = (Screen.Height + Left) / 27
Top = (Screen.Width + Top) / 26
Left = (Screen.Height + Left) / 25
Top = (Screen.Width + Top) / 24
Left = (Screen.Height + Left) / 23
Top = (Screen.Width + Top) / 22
Left = (Screen.Height + Left) / 21
Top = (Screen.Width + Top) / 20
Left = (Screen.Height + Left) / 19
Top = (Screen.Width + Top) / 18
Left = (Screen.Height + Left) / 17
Top = (Screen.Width + Top) / 16
Left = (Screen.Height + Left) / 15
Top = (Screen.Width + Top) / 14
Left = (Screen.Height + Left) / 13
Top = (Screen.Width + Top) / 12
Left = (Screen.Height + Left) / 11
Top = (Screen.Width + Top) / 10
Left = (Screen.Height + Left) / 9
Top = (Screen.Width + Top) / 8
Left = (Screen.Height + Left) / 7
Top = (Screen.Width + Top) / 6
Left = (Screen.Height + Left) / 5
Top = (Screen.Width + Top) / 4
Left = (Screen.Height + Left) / 3
Top = (Screen.Width + Top) / 2
Left = (Screen.Height + Left) / 1
Form1.Show
 
End Sub


Other 32 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

8/11/1999 9:31:00 PMCooL

Uh.....Pretty CooL. KeeP it Up, Again.
(If this comment was disrespectful, please report it.)

 
9/10/1999 3:13:00 PMErik

Very nice, just I have a little constructive critisism so it is not meant to be taken personal. You should use the For statment and instead of making ssssooo much code just because the the numbers go up 1.
(If this comment was disrespectful, please report it.)

 
5/28/2000 4:13:41 AMscanman

Actually, the number goes up 2 by 2 for each dimension of the form... but definitively have to use a loop !!
(If this comment was disrespectful, please report it.)

 
5/28/2000 5:36:15 PMAce315

no, you still don't need a loop (ex: For i = 0 to 32 step 2
...
next i
that meens that i will go 2, 4, 6, 8 etc...
(If this comment was disrespectful, please report it.)

 
8/3/2000 3:06:59 PMblah

that really was NOT cool

(If this comment was disrespectful, please report it.)

 
3/27/2001 10:23:36 AMnit3shift

I just dont get it :)... okay i guess
(If this comment was disrespectful, please report it.)

 
4/7/2002 4:02:39 PMIan

Why did you submit this crap?

You could have just done a loop like:

For i = 1 To 31
Top = (Screen.Height - Width) / i
Left = (Screen.Width - Height) / i + 1
Next i

For i = 31 To 1
Top = (Screen.Height - Width) / i
Left = (Screen.Width - Height) / i + 1
Next i

It really doesn't look cool in the first place though. There are api commands that do better transitions
(If this comment was disrespectful, please report it.)

 
5/21/2002 7:33:21 AMmad_rappa

why submit codes that just moves around a form on the screen so fast that you don't see anything of it?
My opinion: It looks really sick!
(If this comment was disrespectful, please report it.)

 
5/21/2002 7:34:33 AMmad_rappa

maybe if you did a bit of pause between the lines.. try with sleep in the APIs
(If this comment was disrespectful, please report it.)

 
12/11/2002 7:19:07 AM

Amaw ka pards!
(If this comment was disrespectful, please report it.)

 
12/31/2002 2:41:07 PMAaron Hilton

What is is supposed to do? I run it and the form jumps a little and disapears? Really jummpy!!!
(If this comment was disrespectful, please report it.)

 
1/5/2003 11:33:19 AM

Dim i As Single
For i = 0.1 To 31.1 Step 0.25
Top = (Screen.Height - Width) / i
Left = (Screen.Width - Height) / (i + 1)
DoEvents
Next
For i = 31.1 To 0.1 Step -0.25
Top = (Screen.Height - Width) / i
Left = (Screen.Width - Height) / (i + 1)
DoEvents
Next
(If this comment was disrespectful, please report it.)

 
2/26/2003 10:03:47 AM

how to do program about bit stuffing
(If this comment was disrespectful, please report it.)

 
7/23/2003 8:16:58 AM

m
(If this comment was disrespectful, please report it.)

 
9/8/2003 2:31:09 AMAchindra Bhatnagar

Sorry buddy,
but that code isn't efficient. Primarily you have used somuch code instead of loops. Then you have not checked the code on modern fast processors. On fast system, this code makes no difference. The form jumps sp fast that its unidentifiable that if it's some system error ( memory problem) or some fun. You can't use sleep API here because the API locks system resources. So while the fom is jumping here and there, your system will fall low in resources. - Thread Locks.
IF you want to design such an effect then you need to use API's. A combination of graphic API's can produce very cool effects. For Win NT based systems you can use new API's for Fade effects and Transluscency of forms...
Any ways that was OK. Keep going.
(If this comment was disrespectful, please report it.)

 
11/1/2003 10:24:40 PMTwiggy

I'd say timers would have made more sense here, the code used what too big, a loop could have shortened it up, but really timers are what you want because you can actually see them move.
(If this comment was disrespectful, please report it.)

 
11/10/2003 8:28:03 PM

I DONT LIKE IT LOOKS LIKE YOUR COMPUTER IS GETTING SICK

(If this comment was disrespectful, please report it.)

 
2/28/2004 8:18:53 AM

For those that don't have enough brains cells to understand how compilers work - ie. most of you above, it's called loop unrolling and is perfectly efficient. In fact any good compiler (including the modified VB/C compiler) will un-roll loops on compilation. Before you condem others you should first understand.
(If this comment was disrespectful, please report it.)

 
8/29/2004 1:43:56 AM

the sleep api is not good for this the gettickcount api would be good as it doesn't lock the application eg.

pause = GetTickCount + 100
do until GetTickCount => pause
doevents
loop
(If this comment was disrespectful, please report it.)

 
3/22/2005 5:20:41 AM

really the code which you hve given is easily anyone can understand It will be widely used those who are learning visual basic
(If this comment was disrespectful, please report it.)

 
1/21/2006 12:28:35 AMScizor

He's lying, but your still learning, keep up the good work:)
(If this comment was disrespectful, please report it.)

 
9/15/2006 12:11:45 AMAdora Security Team

Sweet Code Im Looking For Som Programs To Join My Group Please Contact Me At Suncharm@hotmail.co.uk for more info thanks.
(If this comment was disrespectful, please report it.)

 
5/8/2007 5:56:22 AMRandolf

weird program ~,~
(If this comment was disrespectful, please report it.)

 
10/1/2007 1:28:17 AManwar

this is a tremendous program ....
(If this comment was disrespectful, please report it.)

 
10/1/2007 1:29:10 AManwar

hi good this is excellent

(If this comment was disrespectful, please report it.)

 
2/21/2008 2:02:51 AMLewin

galaw gawa mga higala. Unsa ni parts, pawala sa kalaay???!!!!
(If this comment was disrespectful, please report it.)

 
12/31/2008 5:32:16 PMMazterzDemon

you code is prone to many errors, ive already done this before with a for next
and i wouldnt use left and top properties, try using only width and height.
(If this comment was disrespectful, please report it.)

 
7/14/2009 10:33:13 AM


(If this comment was disrespectful, please report it.)

 
11/24/2009 11:10:54 PMaji

aneh 'wierd'....@_@
(If this comment was disrespectful, please report it.)

 
11/24/2009 11:11:34 PMaji

weird @.@
(If this comment was disrespectful, please report it.)

 
4/21/2010 6:31:41 AMvbexpert

NOT COOL!
(If this comment was disrespectful, please report it.)

 
4/21/2010 6:32:11 AMvbexpert

hmmmmmmmmmmmmmmmmmmmmm
not cool
(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.