VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Easy Alpha Blend One line of code

by Joseph Simpson (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

This will alpha blend your form when its unloaded cool effect thats alreayd built into windows, i couldn't find anything with the keyword alpha blend that used the AnimateWindow API, so i thought i would

Rate Easy Alpha Blend One line of code

In Your General Section Include This:

Private Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Long, ByVal dwTime As Long, ByVal dwFlags As Long) As Boolean


Private Const AW_HIDE = &H10000

Private Const AW_BLEND = &H80000



On Form_Unload put:

fd = AnimateWindow(Form1.hwnd, 1000, AW_BLEND + AW_HIDE)

End


This will blend your form to whats behind it as long as its the top window. you must include End also without it, it will just hide your program.

Download this snippet    Add to My Saved Code

Easy Alpha Blend One line of code Comments

No comments have been posted about Easy Alpha Blend One line of code. Why not be the first to post a comment about Easy Alpha Blend One line of code.

Post your comment

Subject:
Message:
0/1000 characters