|
-
Aug 29th, 2003, 02:26 PM
#1
Thread Starter
Member
Opacity/Fading/Transparency, please help
Ok heres what I want to do... I want my program to fade from opactity 0 to opacity 100 when the form loads... ive tried many things, but i cant seem to get anything to work. Please help, I really could use it.
Josh
Last edited by pylesj; Aug 29th, 2003 at 09:05 PM.
Smartbar XP is WAY better then Dashboard. http://www.smartbarxp.com
-
Aug 29th, 2003, 04:50 PM
#2
Addicted Member
Opacity is stored as a 'double' value from 0 being transparent and 1 being opaque.
For instance 0.5 is half way.
VB Code:
For d As Double = 0 to 1 Step 0.01
Me.Opacity = d
Next d
Who needs rhetorical questions anyway?
Bazza NET - The place you want to be!

-
Aug 29th, 2003, 08:13 PM
#3
Thread Starter
Member
Ok thanks, I found a solution, but now heres what I need... I have the program masked using Transparency Key, so how do I make it draw in each step? I am using a timer, so on each tick, it adds .01 to the opacity, it may slow the transparency down, but that pink is annoying... anyone help? heres the code:
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Me.Opacity += 0.1 'Look at this, we are increasing the opacity property
'Now let's check to see if the opacity has gone from 1 to 0 yet.
If Me.Opacity = 1 Then 'If it is then
Me.Timer2.Enabled = False
End If
End Sub
Smartbar XP is WAY better then Dashboard. http://www.smartbarxp.com
-
Aug 30th, 2003, 10:14 AM
#4
Thread Starter
Member
Smartbar XP is WAY better then Dashboard. http://www.smartbarxp.com
-
Sep 2nd, 2003, 09:34 PM
#5
Thread Starter
Member
Smartbar XP is WAY better then Dashboard. http://www.smartbarxp.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|