VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Form bouncing against the Start Menu at exit 2.0

Johan Otterud  (2 Submissions)   Miscellaneous   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

This code is a must have! It's cooler than the "Cool Form Close" code , cooler than the "Implode and Explode" code! So what does it do? When you close you program a really cool effect will appear. Your form will shrink so just the Titlebar is being showned, then the titlebar accelerates and bounces againt the start menu, goes up in the air, bounces a couple of more times and then disappears behind the Start Menu! Way Cool! This code is a very advanced one but it's really easy to use, try it!!! Includes functions for getting the top position of your start menu and offcourse the bounce code! New for ver. 2 is that the form now can bounce sideways if you edit the code just a little tiny bit, now also supports maximized windows!!!

Inputs
None really, you might wanna change the speed property in the code if you can find it.

Assumes
Paste the 'main code' into the form_unload section. The declare the variables (IMPORTANT!)

Returns
A really cool 'bouncy' effect. I use it always in my progs!

Side Effects
None, but their might be bugs..

API Declarations
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Dim What As RECT

Rate Form bouncing against the Start Menu at exit 2.0 (3(3 Vote))
Form bouncing against the Start Menu at exit 2.0.bas

Form bouncing against the Start Menu at exit 2.0 Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters