954,559 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

hi

can anyone here know how to make a fade in and fade out label? in visual basic?

ryan311
Posting Whiz in Training
254 posts since Jul 2008
Reputation Points: 3
Solved Threads: 5
 

what exactly is a fade in and fade out label ?

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

fade in fade out like in macromedia flash the alpha effects :) how can i do that in visual basic? it is possible?

ryan311
Posting Whiz in Training
254 posts since Jul 2008
Reputation Points: 3
Solved Threads: 5
 

Hi,

I Guess, there is no in-built control like that in VB6, But you can Create one..

Place a Timer Control on the Form, and set its Interval =200
Also Place a Label Control..
Write this code:

Private Sub Timer1_Timer()
    '
    Static T As Integer
    Static LFlag As Boolean
    '
    If LFlag Then
        T = T + 10
    Else
        T = T - 10
    End If
    If T > 260 Then
        T = 250
        LFlag = False
    End If
    If T < 0 Then
        T = 0
        LFlag = True
    End If
    '
    Label1.ForeColor = RGB(T, T, T)
    Label1.Refresh
    '
End Sub


Regards
Veena

QVeen72
Posting Shark
950 posts since Nov 2006
Reputation Points: 84
Solved Threads: 143
 

maybe using GDI?

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

thnx veena but how it work w/ 5 text for example first to see is "Me" second "You" Third "Everywhere" etc. it is possible?

ryan311
Posting Whiz in Training
254 posts since Jul 2008
Reputation Points: 3
Solved Threads: 5
 

well, you will trigger the timer inside each timer so if 1st timer is going to finish the job the second timer must be enabled in order to run the second timer and so on...

jireh
Posting Whiz
316 posts since Jul 2007
Reputation Points: 11
Solved Threads: 49
 

how would i go about making just a FADE IN label from white to black but not fade out again i cnt get it to work??

Matt3144
Newbie Poster
7 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

in your timer event deduct the opacity of the label in every tick og the timer then after it was about 50% change the color to black or white then back the add the opacity in every tick until it will be 100%. just like that.

jireh
Posting Whiz
316 posts since Jul 2007
Reputation Points: 11
Solved Threads: 49
 

hi jerih can u give me sample thanks :)

ryan311
Posting Whiz in Training
254 posts since Jul 2008
Reputation Points: 3
Solved Threads: 5
 

hi jerih can u give me a sample of the fade in code you were talking about plz, thanks .........

Matt3144
Newbie Poster
7 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You