winzip icon

Animated, shimmering form reflection effect

Email
Submitted on: 2/15/2015 10:33:00 PM
By: grigri (from psc cd)  
Level: Advanced
User Rating: By 23 Users
Compatibility: VB 6.0
Views: 1099
 
     This code creates a semi-transparent reflection of your form which shimmers in realtime. The screenshot shows the basic idea, but it looks much better animated! It uses the UpdateLayeredWindow() API, so will only work on 2k/XP. I have only tested it on XP. It can use quite a bit of CPU (especially while moving or sizing the form) but could be a nice feature on an about box or something. Parts of the code are optimized, others are not. It could easily be improved upon, and I welcome any suggestions you might have. The effect subclasses your form. To keep the code simple, I have not used ASM-thunking as I usually do, so if you run it in the IDE: DO NOT press the stop button, and DO NOT try and debug-step through the subclassed WindowProc. If you avoid doing this it will run in the IDE quite nicely. There is one "feature" that occurs when the form is near the left edge of the screen : the wave is shunted to the right. I don't know why, if you do, tell me! Some routines were adapted from the vbaccelerator article at http://www.vbaccelerator.com/home/vb/code/libraries/Graphics_and_GDI/Drop_Shadows/article.asp

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com


Other 8 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 Advanced 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.