Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
AnimateWindow (user32)
.
C# Signature:
[DllImport("user32")]
static extern bool AnimateWindow(IntPtr hwnd, int time, AnimateWindowFlags flags);
VB Signature:
Imports System.Runtime.InteropServices
<DllImport("user32.dll")> _
Shared Function AnimateWindow(ByVal hwnd As IntPtr, ByVal time As Integer, ByVal flags As AnimateWindowFlags) As Boolean
End Function
To get an animation to run in reverse, to say, animate the window closing use some thing like:
Dim f2 As New Form2
AnimateWindow(f2.Handle, 1000, AnimateWindowFlags.AW_VER_NEGATIVE Or AnimateWindowFlags.AW_SLIDE or AnimateWindowFlags.AW_HIDE)
f2.Show()
The AW_HIDE will make any of the animations run in reverse.
AnimateWindow doesn't actually show the window so make sure you call Show() or set this.Visible = true after calling AnimateWindow
C# Sample Code:
This assumes that the AnimateWindow function is declared inside class User32
Dim f2 As New Form2
AnimateWindow(f2.Handle, 1000, AnimateWindowFlags.AW_VER_NEGATIVE Or AnimateWindowFlags.AW_SLIDE or AnimateWindowFlags.AW_HIDE)
f2.Show()
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).