i want to be able to click a button on a form, which will make a piece slide out of or appear at the side of the form, which i can close again without closing the form. the piece that slides out/appears is to contain more controls. is this possible?
'Constants to specify animation type and direction
Enum AnimationConstants As Integer
AW_HOR_POSITIVE = 1
AW_HOR_NEGATIVE = 2
AW_VER_POSITIVE = 4
AW_VER_NEGATIVE = 8
AW_CENTER = 16
AW_HIDE = 65536
AW_ACTIVATE = 131072
AW_SLIDE = 262144
AW_BLEND = 524288
End Enum
'Import from Windows API
<System.Runtime.InteropServices.DllImport("user32.dll")> _
Shared Function AnimateWindow( _
ByVal hWnd As IntPtr, _
ByVal millseconds As Integer, _
ByVal lFlags As AnimationConstants) As Boolean
End Function
Sub Example()
AnimateWindow(Me.Handle, 300, AnimationConstants.AW_VER_NEGATIVE)
End Sub
enum AnimationConstants{
AW_HOR_POSITIVE = 1,
AW_HOR_NEGATIVE = 2,
AW_VER_POSITIVE = 4 ,
AW_VER_NEGATIVE = 8,
AW_CENTER = 16,
AW_HIDE = 65536,
AW_ACTIVATE = 131072,
AW_SLIDE = 262144,
AW_BLEND = 524288
}
[System.Runtime.InteropServices.DllImport("user32.dll")]
bool AnimateWindow(IntPtr hWnd, int millseconds, AnimationConstants Flags );
void Example(){
AnimateWindow(this.Handle, 300, AnimationConstants.AW_VER_NEGATIVE);
}