Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Fade In / Out Form [Source]
#1
Hello SF!
Today I will show you the said subject.

In your Form, Select the Two Timers i.e timer1 and time2. Set the properties as below

timer1 > Enabled = true , Timer = 1
timer2 > Enabled = false , Timer = 1



In your exit application button, use this code...

Code:
private void btnExitApplication_Click(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            timer2.Enabled = true;
        }


Now Double click on timer1 and timer2 respectively and add this code.

Code:
private void timer1_Tick(object sender, EventArgs e)
        {
            Opacity += 0.03;
            if (Opacity == 100)
            {
                timer1.Enabled = false;
            }
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
            Opacity -= 0.03;
            if (Opacity == 0)
            {
                ProjectData.EndApp();
            }
        }

In your Form, Select Opacity = 0%

Thats it!! Tell me how is this work?
Hope you like it.

Regards
Reply
#2
Thanks for this, very helpful. Smile
Reply
#3
Code:
Private Sub btnExitApplication_Click(sender As Object, e As EventArgs)
    timer1.Enabled = False
    timer2.Enabled = True
End Sub

Code:
Private Sub timer1_Tick(sender As Object, e As EventArgs)
    Opacity += 0.03
    If Opacity = 100 Then
        timer1.Enabled = False
    End If
End Sub

Private Sub timer2_Tick(sender As Object, e As EventArgs)
    Opacity -= 0.03
    If Opacity = 0 Then
        ProjectData.EndApp()
    End If
End Sub
[Image: skyk.png]
Reply
#4
Thanks a great deal for this buddy, I have bookmarked this page.
Reply
#5
Thanks for your feedback.
REgards with best wishes
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem in form Chuggaism 3 2,023 11-07-2013, 06:35 PM
Last Post: AceInfinity
  [VB.NET] Animated Form Extend [SRC] Fragma 6 5,540 10-10-2013, 12:18 PM
Last Post: Saket
  Greation a promission for users in main form or setting deveco 2 1,020 11-13-2012, 01:33 PM
Last Post: TAHMINA123
  [TuToRiAl] How to make Offline (No Internet) Captcha (Human Confirmation) [TuToRiAl] Resistance 24 12,520 08-30-2012, 10:14 PM
Last Post: Resistance
  [Source ] Hemp Tycoon App [/Source] VB.net KoBE 8 9,748 03-05-2012, 10:30 PM
Last Post: SomeWhiteGuy?

Forum Jump:


Users browsing this thread: 1 Guest(s)