Nice fading in and out form effect-VBForums
Page 1 of 2 12 LastLast
Results 1 to 40 of 45

Thread: Nice fading in and out form effect

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2007
    Posts
    279

    Smile Nice fading in and out form effect

    Hi,

    A while ago I designed a small subroutine that would allow me to fade forms in and out. The effect is very nice and adds a bit of sleekness to your application. There is also a C# version, this can be found in the C# codebank here

    Code:
        Sub FormFade(ByVal FType)
            Select Case FType
                Case ("in")
                    Dim FadeCount As Integer
                    For FadeCount = 10 To 90 Step 10
                        Me.Opacity = FadeCount / 100
                        Me.Refresh()
                        Threading.Thread.Sleep(50)
                    Next
                Case ("out")
                    Dim FadeCount As Integer
                    For FadeCount = 90 To 10 Step -10
                        Me.Opacity = FadeCount / 100
                        Me.Refresh()
                        Threading.Thread.Sleep(50)
                    Next
            End Select
            Me.Opacity = 99
    
        End Sub
    This subroutine can be called like this:

    FormFade("in") for fading your form in
    FormFade("out") for fading your form out

    The form fade in can be implemented on your Form Load event handler like so:

    Code:
      Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            FormFade("in")
        End Sub
    The form fade out can be implemented on your Form Closing event handler as it will catch all attempts to close, not just ones you might add to your Command Button. This can be implemented like this:

    Code:
        Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
            FormFade("out")
        End Sub
    Additional Information

    This should work with all versions of .net

    As you have seen I have set Me.Opacity = 99. This is for two reasons. One being that the fade in effect does not fully reach the 100/99% so the form does not look solid. The second is that if fading out with 100% opacity the form will glitch slightly. You will notice no difference between 99% and 100% opacity though.

    I'd love to know what you think of this, yes it's not original, but for those looking for something like this, I think it is a good little script.
    Last edited by samtheman; Oct 9th, 2008 at 01:08 PM.
    If you found any of my posts helpful then please rate them.

    CodeBank

    Form Fading Effects in VB.NET and C#

  2. #2
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    3,811

    Re: Nice fading in and out form effect

    To be more specific the glitch happens between 0.96 and 100.0, so to avoid the form flicker thing, have it fade in from 0.0 to 0.95, then from 0.95 back to 0.0 when fading out. Also, when avoiding the form flicker and setting the opacity to 0.95 the form is semi-transparent still.

    I'm working on a game that fades in when ran and fades out when closed, except I used an enumeration for the direction (In/Out) and a timer for a smoother effect.

    Edit: This flicker thing doesn't happen in .Net 1.1
    Last edited by JuggaloBrotha; Oct 13th, 2008 at 08:10 AM.

  3. #3
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    3,811

    Re: Nice fading in and out form effect

    Here's how I do fading in and out using the form's opacity property and a Timer:
    Code:
    Option Explicit On
    Option Strict On
    
    Friend Class Form1
    
        Private m_UseFormFade As Boolean = False
        Private m_FadeSpeed As Integer = 30I
    
    #Region " FormFade Stuff "
        Private m_FormFadeDir As FadeDir = FadeDir.FadeIn
        Private m_FormHasFadedOut As Boolean = False
        Private WithEvents m_Timer As Timer
    
        Private Enum FadeDir
            FadeIn = 0I
            FadeOut = 1I
        End Enum
    #End Region
    #Region " Main Form: FormClosing, Load, Shown "
        Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
            If Not (m_Timer Is Nothing) AndAlso m_FormHasFadedOut = False Then
                e.Cancel = True
                m_Timer.Start()
            End If
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If m_UseFormFade = True Then
                Me.Opacity = 0.0R
                m_Timer = New Timer()
                m_Timer.Interval = m_FadeSpeed
            End If
        End Sub
    
        Private Sub Form1_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
            If Not (m_Timer Is Nothing) Then m_Timer.Start()
        End Sub
    #End Region
    #Region " FormFadeTimer "
        <System.Diagnostics.DebuggerStepThrough()> _
        Private Sub FormFadeTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles m_Timer.Tick
            Select Case m_FormFadeDir
                Case FadeDir.FadeIn
                    Me.Opacity += 0.05R
                Case Else
                    Me.Opacity -= 0.05R
            End Select
            If Me.Opacity <= 0.0R OrElse Me.Opacity >= 1.0R Then
                m_Timer.Stop()
                If m_FormFadeDir = FadeDir.FadeIn Then
                    m_FormFadeDir = FadeDir.FadeOut
                    m_FormHasFadedOut = False
                Else
                    m_FormHasFadedOut = True
                    Me.Close()
                End If
            End If
        End Sub
    #End Region
    
        Private Sub CloseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseButton.Click
            Me.Close()
        End Sub
    End Class
    This works for all versions of .Net and the .net 2.0 form flicker still happens with my code. Hopefully MS will fix that flicker in a future hotfix.
    Last edited by JuggaloBrotha; Oct 16th, 2008 at 08:51 AM.

  4. #4
    Lively Member
    Join Date
    Aug 2008
    Posts
    75

    Re: Nice fading in and out form effect

    shouldnt this
    vb Code:
    1. Private WithEvents m_Timer As Timer

    be this ?
    vb Code:
    1. Private WithEvents m_Timer As  New Timer


    and how would i change the speed that it fades out in?

    edit you change it in this line....
    Me.Opacity -= 0.05R

    i change it to
    Me.Opacity += 0.15R

    and it was alot faster, thank you
    Last edited by ahostbr; Oct 24th, 2008 at 05:50 AM.
    How To Make A Youtube Downloader
    I use Visual Studio 2008 Pro...

  5. #5
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    3,811

    Re: Nice fading in and out form effect

    Quote Originally Posted by ahostbr
    shouldnt this
    vb Code:
    1. Private WithEvents m_Timer As Timer

    be this ?
    vb Code:
    1. Private WithEvents m_Timer As  New Timer
    No, the form's Load event is what handles that. I have it instantiated in the Load event to make use of the 'm_UseFormFade' variable, which determines whether the fade happens or not (easy way to turn the fade feature on and off)
    Quote Originally Posted by ahostbr
    and how would i change the speed that it fades out in?

    edit you change it in this line....
    Me.Opacity -= 0.05R

    i change it to
    Me.Opacity += 0.15R

    and it was alot faster, thank you
    Or change the speed of the timer which would have it fade in / out much more smoothly. To change the speed of the timer change the 'm_FadeSpeed' variable, the smaller the number the faster the timer does the fade effect.

  6. #6
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    Nice code, but why not use the AnimateWindow API?

    Code:
        Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As Integer) As Boolean
    
        Public Enum AnimateStyles
            Slide = 262144
            Activate = 131072
            Blend = 524288
            Hide = 65536
            Center = 16
            HOR_Positive = 1
            HOR_Negative = 2
            VER_Positive = 4
            VER_Negative = 8
        End Enum
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            AnimateWindow(Me.Handle, 1000, AnimateStyles.HOR_Negative Or AnimateStyles.Blend)
        End Sub
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  7. #7
    Lively Member
    Join Date
    Aug 2008
    Posts
    75

    Re: Nice fading in and out form effect

    Quote Originally Posted by .NetNinja
    Nice code, but why not use the AnimateWindow API?

    Code:
        Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As Integer) As Boolean
    
        Public Enum AnimateStyles
            Slide = 262144
            Activate = 131072
            Blend = 524288
            Hide = 65536
            Center = 16
            HOR_Positive = 1
            HOR_Negative = 2
            VER_Positive = 4
            VER_Negative = 8
        End Enum
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            AnimateWindow(Me.Handle, 1000, AnimateStyles.HOR_Negative Or AnimateStyles.Blend)
        End Sub
    using .net 3.5 sp1 with visual studio 2008 pro SP1 that does nothing ...
    any help please
    How To Make A Youtube Downloader
    I use Visual Studio 2008 Pro...

  8. #8
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    I just tested it on 3.5 SP1 VS2008 on windows xp and windows vista and it worked. Are you using that exact code or did you modify it any?
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  9. #9
    Lively Member
    Join Date
    Aug 2008
    Posts
    75

    Re: Nice fading in and out form effect

    Quote Originally Posted by .NetNinja
    I just tested it on 3.5 SP1 VS2008 on windows xp and windows vista and it worked. Are you using that exact code or did you modify it any?
    yes exact code... with a bran new blank form... idk what the problem could be... i also downloaded your animatewindow control... and cant seem to get that to work... maybe its my .net or something
    How To Make A Youtube Downloader
    I use Visual Studio 2008 Pro...

  10. #10
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    Shouldn't have anything to do with .Net. Its just a DLL call. Can you post your full form class?
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  11. #11
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Im wanting to fade in a child form after button click on parent form, is this possible if so could i have a hint towards the code please

  12. #12
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    Just do it like my previous post states:

    Code:
        Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As Integer) As Boolean
    
        Public Enum AnimateStyles
            Slide = 262144
            Activate = 131072
            Blend = 524288
            Hide = 65536
            Center = 16
            HOR_Positive = 1
            HOR_Negative = 2
            VER_Positive = 4
            VER_Negative = 8
        End Enum
        Private Sub Button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            AnimateWindow(ChildForm.Handle, 1000, AnimateStyles.HOR_Negative Or AnimateStyles.Blend)
            ChildForm.ShowDialog();
        End Sub
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  13. #13
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Name "AnimateWindow" is not declared, Sorry im still new to VB im using 2008 if that helps.

  14. #14
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    You have to declare it... You have to use all the code I posted.

    If you are having an issue post your code and I will help you debug it.
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  15. #15
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    This is my current code, i think its a bit mssed up lol.

    Code:
    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
        End Sub
        Sub FormFade(ByVal FType)
            Select Case FType
                Case ("in")
                    Dim FadeCount As Integer
                    For FadeCount = 10 To 90 Step 10
                        Me.Opacity = FadeCount / 100
                        Me.Refresh()
                        Threading.Thread.Sleep(50)
                    Next
                Case ("out")
                    Dim FadeCount As Integer
                    For FadeCount = 90 To 10 Step -10
                        Me.Opacity = FadeCount / 100
                        Me.Refresh()
                        Threading.Thread.Sleep(50)
                    Next
            End Select
            Me.Opacity = 99
    
        End Sub
        Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            AnimateWindow(ChildForm1.Handle, 1000, AnimateStyles.HOR_Negative Or AnimateStyles.Blend)
            ChildForm1.ShowDialog();
        End Sub
    
        Public Enum AnimateStyles
            Slide = 262144
            Activate = 131072
            Blend = 524288
            Hide = 65536
            Center = 16
            HOR_Positive = 1
            HOR_Negative = 2
            VER_Positive = 4
            VER_Negative = 8
        End Enum
    End Class

  16. #16
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    You are missing the declaration for AnimateWindow.

    Here is your code corrected:

    Code:
    Public Class Form1
    
        Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As Integer) As Boolean
    
        Public Enum AnimateStyles
            Slide = 262144
            Activate = 131072
            Blend = 524288
            Hide = 65536
            Center = 16
            HOR_Positive = 1
            HOR_Negative = 2
            VER_Positive = 4
            VER_Negative = 8
        End Enum
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
        End Sub
    
        Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            AnimateWindow(ChildForm1.Handle, 1000, AnimateStyles.HOR_Negative Or AnimateStyles.Blend)
            ChildForm1.ShowDialog();
        End Sub
    
    End Class
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  17. #17
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Sorry had to go out, only getting one error now and it saying charcter is invalid and underlining this symbol ;

    EDIT: Deleted the symbol and now it works perfect, Thanks alot NetNinja

  18. #18
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    3,811

    Re: Nice fading in and out form effect

    ChildForm1.ShowDialog(); <-- remove that, vb doesn't use semicolon line breaks

  19. #19
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    Quote Originally Posted by JuggaloBrotha View Post
    ChildForm1.ShowDialog(); <-- remove that, vb doesn't use semicolon line breaks
    Yeah sorry about that. I've been coding a C# app lately...
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  20. #20
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    You guys have been awesome, wonder if you could help me some more lol.

    i have my child form fade in on button click from parent form, but when 2nd form is visible i have the application bar thing at the bottom (Start bar where all programmes are open) well i have 1 for each form, any idea if i can have one for both?

  21. #21
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    There is an option in the properties bar for a form in Visual Studio called ShowInTaskbar set that to true or false.
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  22. #22
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Yet again you sieze to amaze me, think im going to be a regular on this forum lol.

    Ok Apps been working fine but then when i run a debug to try it out i get this warning.

    A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.Windows.Forms.dll

    And my Fade in doesnt work :S what i done wrong now lol.

  23. #23
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    Can you post your code?
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  24. #24
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Blue bit is were the fault it.

    Code:
    Public Class ChildForm1
        Sub FormFade(ByVal FType)
            Select Case FType
                Case ("in")
                    Dim FadeCount As Integer
                    For FadeCount = 10 To 90 Step 10
                        Me.Opacity = FadeCount / 95
                        Me.Refresh()
                        Threading.Thread.Sleep(50)
                    Next
                Case ("out")
                    Dim FadeCount As Integer
                    For FadeCount = 90 To 10 Step -10
                        Me.Opacity = FadeCount / 100
                        Me.Refresh()
                        Threading.Thread.Sleep(50)
                    Next
            End Select
            Me.Opacity = 99
    
        End Sub
    
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            FormFade("in")
        End Sub
    End Class

  25. #25
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    Are you using the FormFade or are you using AnimateWindow API? The examples I gave you were for the AnimateWindow API. I will have to do some testing if you are going to use the FormFade sub.
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  26. #26
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Im using the 1st code you gave me when you re-wrote it for me, it has been working fine then just stopped.

  27. #27
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    The first code I gave you uses the AnimateWindow API. The code you posted uses samtheman code. So you shouldn't have the FormFade sub with my code.
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  28. #28
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Sorry, just remembered i have 2 forms :P lol

    This is the code i have in my parent form.
    Code:
    Public Class Form1
    
        Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As Integer) As Boolean
    
        Public Enum AnimateStyles
            Slide = 262144
            Activate = 131072
            Blend = 524288
            Hide = 65536
            Center = 16
            HOR_Positive = 1
            HOR_Negative = 2
            VER_Positive = 4
            VER_Negative = 8
        End Enum
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
        End Sub
    
        Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            AnimateWindow(ChildForm1.Handle, 1000, AnimateStyles.HOR_Negative Or AnimateStyles.Blend)
            ChildForm1.ShowDialog()
        End Sub
    
    End Class
    On the button click i wan t it to fade in form2 but atm its just appearing.

  29. #29
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    I copied your code in a new project and it is working fine...
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  30. #30
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    I cant get it to fade in, it just appears, then Child form that is on button click.

  31. #31
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    So if I understand you correctly, when you press the button, the child form is NOT fading in?
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  32. #32
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Yes thats correct it just appears CenterParent.

  33. #33
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    I ran the code you posted and the ChildForm blends correctly... Can you post your code again from your IDE to make sure I'm not missing something.
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  34. #34
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Code from ParentForm
    Code:
    Public Class Form1
    
        Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As Integer) As Boolean
    
        Public Enum AnimateStyles
            Slide = 262144
            Activate = 131072
            Blend = 524288
            Hide = 65536
            Center = 16
            HOR_Positive = 1
            HOR_Negative = 2
            VER_Positive = 4
            VER_Negative = 8
        End Enum
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
        End Sub
    
        Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            AnimateWindow(ChildForm1.Handle, 1000, AnimateStyles.HOR_Negative Or AnimateStyles.Blend)
            ChildForm1.ShowDialog()
        End Sub
    
        Private Sub ToolTip1_Popup(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PopupEventArgs)
    
        End Sub
    End Class
    Child Form
    Code:
    Public Class ChildForm1
    
    
        Private Sub ChildForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
        End Sub
    End Class
    Aint done alot to child form lol

  35. #35
    Hyperactive Member .NetNinja's Avatar
    Join Date
    Oct 2008
    Location
    USA
    Posts
    281

    Re: Nice fading in and out form effect

    Can you paste the designer code for childform? I used the above code and it worked fine.
    "Don't try to be a great man. Just be a man and let history make its own judgement."

  36. #36
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Thats all code i have.

    It maybe just my Laptop lagging, Dont have very good spec. ill just continue with project and see how it goes at the end lol, thanks so much

  37. #37
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    Another question, is it possible to fade a button out after clicked? if so how lol.

  38. #38
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    3,811

    Re: Nice fading in and out form effect

    Quote Originally Posted by CimSlunt View Post
    Another question, is it possible to fade a button out after clicked? if so how lol.
    *waits for chris to jump in with his WPF bandwagon*

    Fading a single control on the form is going to be extremely tricky, winforms wasn't designed with that in mind. WPF on the other hand has all of those things in mind.

  39. #39
    Member
    Join Date
    Aug 2009
    Posts
    53

    Re: Nice fading in and out form effect

    How about just having the button disappear on click then lol

  40. #40
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    3,811

    Re: Nice fading in and out form effect

    Button.Visible = False 'To hide it

Page 1 of 2 12 LastLast

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.