Results 1 to 13 of 13

Thread: Aaro4130's Codes

Threaded View

  1. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2010
    Posts
    23

    Re: Aaro4130's Codes

    [TUTORIAL] : Make a fading exit effect on your form

    This is my little tutorial about making a fading exit-effect on a form


    CONTROLS - Add the following to your form

    - 1 Timer (Enabled=False, Interval=1)

    STEP-BY-STEP - The How To

    - Declare the following variables before any functions/subs yet within the class

    Code:
    Dim cancelClose As Boolean = True
    - Add this to your form's load code

    Code:
    Me.AllowTransparency = True
    - Add this to your timers "tick" code

    Code:
      Me.Opacity -= 0.05
            If Me.Opacity = 0 Then
                cancelClose = False
                Me.Close()
            End If
    - Finally, add this to the form's FormClosing() event

    Code:
         fadetimer.Enabled = True
            e.Cancel = cancelClose
    YOUR DONE!

    Enjoy your fading form
    Last edited by aaro4130; Aug 19th, 2012 at 01:37 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width