locked
Form effects RRS feed

  • Question

  • Does someone know an effect for form1, like fade in and out or slide effect. if you know another one please post codes. thnx..
    G peter.
    Wednesday, January 6, 2010 7:51 PM

Answers

  • Does someone know an effect for form1, like fade in and out or slide effect. if you know another one please post codes. thnx..
    G peter.

    This is up to you, form does not have any effect unless you implement it on your own. There are many effects out there that you can applied to your form.
    Try this http://www.emoreau.com/Entries/Articles/2009/07/Windows-Forms-Effect.aspx

    kaymaf

    If that what you want, take it. If not, ignored it and no complain
    • Marked as answer by G peter Thursday, January 7, 2010 6:30 AM
    Wednesday, January 6, 2010 8:10 PM
  • Hi G Peter,

    You have also asked about TextBox effects.>>

    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/1eb31bc2-47d3-4e46-8544-32b1d03b8c87

    without marking any as answer.  Please mark some of the replies as answer if they help you.


    I can think of many FORM effects, not just FADE in and out but also making the FORM different shapes,
     also you could use a GradientBrush and do this sort of thing.>>







    Regards,

    John
    • Marked as answer by G peter Thursday, January 7, 2010 6:30 AM
    Thursday, January 7, 2010 12:35 AM
  • Hi G Peter.  I know you've gotten some code already for form fade effects, but I came across a class that does it much better than the quick and easy version by hooking directly into the Windows APIs.  It's called DDFormFader, found on Code Project here:

    http://www.codeproject.com/KB/cs/DDFormsFader.aspx?msg=3237512

    This is written in C# but I have converted it to VB and have made it available through my SkyDrive (it's a bit too long for a thread post).  Here's the link:

    http://cid-fab940c83fdcdd1e.skydrive.live.com/self.aspx/Public/DD%20Form%20Fader%20Class/FormFader.vb

    Here's an example of all that is needed for your form code to make it work...  you just need to add the FormFader class from the link above to yourproject -- try it out, it is much more smooth than just setting the opacity.
     
    Public Class Form1
    
        Private FF As DDFormsExtentions.DDFormFader
    
    
        Public Sub New()
    
            ' This call is required by the Windows Form Designer.
            InitializeComponent()
    
            FF = New DDFormsExtentions.DDFormFader(Handle)
            '//set the form to a Layered Window Form
            FF.setTransparentLayeredWindow()
            '//sets the length of time between fade steps in Milliseconds 
            FF.seekSpeed = 60
            '// sets the amount of steps to take to reach target opacity    
            FF.StepsToFade = 12
    
            FF.updateOpacity(CByte(0), False) '// set the forms opacity to 0;
    
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            FF.seekTo(CByte(255))
        End Sub
    End Class
    
     
     
     
     
    • Marked as answer by G peter Thursday, January 7, 2010 6:30 AM
    Thursday, January 7, 2010 2:33 AM

All replies

  • Use a timer to adjust for forms opacity property to fade in or out . To slide a form or control change it's location property probably best done with a timer .
    coding for fun Be a good forum member mark posts that contain the answers to your questions or those that are helpful
    Please format the code in your posts with the button . Makes it easier to read .
    • Proposed as answer by Cor Ligthert Thursday, January 7, 2010 4:51 AM
    Wednesday, January 6, 2010 8:08 PM
  • fade in and out

    'Fade In
    
    Dim fader as Double
    For fader = 0 to 1.01 step 0.01
        Me.Opacity = fader
    Next
    
    
    
    ---------------------------------------------------------------------------
    
    
    'Fade Out
    
    Dim faderout as Double
    For faderout = 1 to 0 step -0.01
        Me. Opacity = faderout
    Next
    • Edited by todda2008 Wednesday, January 6, 2010 8:09 PM im a dumbass
    Wednesday, January 6, 2010 8:09 PM
  • Does someone know an effect for form1, like fade in and out or slide effect. if you know another one please post codes. thnx..
    G peter.

    This is up to you, form does not have any effect unless you implement it on your own. There are many effects out there that you can applied to your form.
    Try this http://www.emoreau.com/Entries/Articles/2009/07/Windows-Forms-Effect.aspx

    kaymaf

    If that what you want, take it. If not, ignored it and no complain
    • Marked as answer by G peter Thursday, January 7, 2010 6:30 AM
    Wednesday, January 6, 2010 8:10 PM
  • Hi G Peter,

    You have also asked about TextBox effects.>>

    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/1eb31bc2-47d3-4e46-8544-32b1d03b8c87

    without marking any as answer.  Please mark some of the replies as answer if they help you.


    I can think of many FORM effects, not just FADE in and out but also making the FORM different shapes,
     also you could use a GradientBrush and do this sort of thing.>>







    Regards,

    John
    • Marked as answer by G peter Thursday, January 7, 2010 6:30 AM
    Thursday, January 7, 2010 12:35 AM
  • Hi G Peter.  I know you've gotten some code already for form fade effects, but I came across a class that does it much better than the quick and easy version by hooking directly into the Windows APIs.  It's called DDFormFader, found on Code Project here:

    http://www.codeproject.com/KB/cs/DDFormsFader.aspx?msg=3237512

    This is written in C# but I have converted it to VB and have made it available through my SkyDrive (it's a bit too long for a thread post).  Here's the link:

    http://cid-fab940c83fdcdd1e.skydrive.live.com/self.aspx/Public/DD%20Form%20Fader%20Class/FormFader.vb

    Here's an example of all that is needed for your form code to make it work...  you just need to add the FormFader class from the link above to yourproject -- try it out, it is much more smooth than just setting the opacity.
     
    Public Class Form1
    
        Private FF As DDFormsExtentions.DDFormFader
    
    
        Public Sub New()
    
            ' This call is required by the Windows Form Designer.
            InitializeComponent()
    
            FF = New DDFormsExtentions.DDFormFader(Handle)
            '//set the form to a Layered Window Form
            FF.setTransparentLayeredWindow()
            '//sets the length of time between fade steps in Milliseconds 
            FF.seekSpeed = 60
            '// sets the amount of steps to take to reach target opacity    
            FF.StepsToFade = 12
    
            FF.updateOpacity(CByte(0), False) '// set the forms opacity to 0;
    
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            FF.seekTo(CByte(255))
        End Sub
    End Class
    
     
     
     
     
    • Marked as answer by G peter Thursday, January 7, 2010 6:30 AM
    Thursday, January 7, 2010 2:33 AM