animate window

hi guyz,
i am trying to call animatewindow call from user32.dll..
and it was all correct as it is, it is written as i had seen in one of the web sites.
also i tried to find that method using apitextloader (winapi tool)
but there is not a function by this name..
but it is there in online msdn winapi support ,
so what's the deal ,if it's compiling it's not showing any proper animation..
so if anybody can help it would be great
ashish
Idea


Answer this question

animate window

  • jmshearer

    Ashish -

    I was able to get this to work using Beta2.  Here is my code for it.  I just replaced the Form1.cs code with the following:

    <FlagsAttribute()> _
    Public Enum AnimateWindowFlags< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

        AW_HOR_POSITIVE = &H1

        AW_HOR_NEGATIVE = &H2

        AW_VER_POSITIVE = &H4

        AW_VER_NEGATIVE = &H8

        AW_CENTER = &H10

        AW_HIDE = &H10000

        AW_ACTIVATE = &H20000

        AW_SLIDE = &H40000

        AW_BLEND = &H80000

    End Enum

     

     

    Public Class Form1

     

        Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As AnimateWindowFlags) As Boolean

     

     

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

            Dim f2 As Form

            f2 = New Form()

            AnimateWindow(f2.Handle, 1000, AnimateWindowFlags.AW_VER_NEGATIVE Or AnimateWindowFlags.AW_SLIDE)

            f2.Show()

     

        End Sub

    End Class


    This should work as expected.  If it still isn't working for you, could you give some more details on what your system setup is

    Thanks,
    Luke Hoban
    Visual C# IDE Program Manager


  • satyap

    /this is the code (not properly placed),that i had written, but i didn't  got any proper results..Idea

    /this is function declaration

    Public Declare Auto Function AnimateWindow Lib "user32" (ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As AnimateWindowFlags) As Boolean

    /this is animateflagsattribute enumeration
    <FlagsAttribute()> _
        Public Enum AnimateWindowFlags
        AW_HOR_POSITIVE = &H1
        AW_HOR_NEGATIVE = &H2
        AW_VER_POSITIVE = &H4
        AW_VER_NEGATIVE = &H8
        AW_CENTER = &H10
        AW_HIDE = &H10000
        AW_ACTIVATE = &H20000
        AW_SLIDE = &H40000
        AW_BLEND = &H80000
        End Enum

    /this is the function call,u can call it in any local event..
    Dim f2 As Form2
    f2 = New Form2
    AnimateWindow(f2.Handle, 1000, AnimateWindowFlags.AW_VER_NEGATIVE Or AnimateWindowFlags.AW_SLIDE)
    f2.Show()

    ashish

  • abdulhakeem_h

    Hi,


    Yup, Animate Window is defined online...
    Could you give us more information Code Snippets
    It would really be helpful to be able to solve your problem...





    cheers,


    Paul June A. Domag

  • animate window