Hey guys,
I used the vb.net to c# converter to convert john's formanimator code to csharp.

However, he has this method in his code:

vb.net Code:
  1. 'Windows API function used to animate the form.
  2.     Private Declare Auto Function AnimateWindow Lib "user32" (ByVal hWnd As IntPtr, _
  3.                                                               ByVal dwTime As Integer, _
  4.                                                               ByVal dwFlags As Integer) As Boolean
  5.  
  6.    'Animates the form automatically when it is loaded.
  7.     Private Sub m_Form_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles m_Form.Load
  8.         'MDI child forms do not support transparency so do not try to use the Blend method.
  9.         If Me.m_Form.MdiParent Is Nothing OrElse Me.m_Method <> AnimationMethod.Blend Then
  10.             'Activate the form.
  11.             Me.AnimateWindow(Me.m_Form.Handle, _
  12.                              Me.m_Duration, _
  13.                              Me.AW_ACTIVATE Or Me.m_Method Or Me.m_Direction)
  14.         End If
  15.     End Sub

and the associated variables + their types:

vb.net Code:
  1. Public Enum AnimationDirection
  2.         Right = &H1
  3.        Left = &H2
  4.         Down = &H4
  5.         Up = &H8
  6.     End Enum
  7.  
  8.    Public Enum AnimationMethod
  9.           Roll = &H0    
  10.         Centre = &H10
  11.         Slide = &H40000
  12.         Blend = &H80000
  13.     End Enum
  14.  
  15.  Private Const AW_HIDE As Integer = &H10000      'Hide the form.
  16.     Private Const AW_ACTIVATE As Integer = &H20000  'Activate the form.
  17.  
  18.     Private m_Method As AnimationMethod         'The animation method used to show and hide the form.
  19.     Private m_Direction As AnimationDirection   'The direction in which to Roll or Slide the form.


So
now I dont understand how his hexadecimal values are working. The API is expecting an integer for "flags" for its last parameter.
however John is using

Me.AW_ACTIVATE Or Me.m_Method Or Me.m_Direction

which dosnt make sense to me.. what does OR do in this case? adds them up? because i think that the "flags" parameter (which is an int) must contain information about activate/hide, methodoftravel, and direction of travel.

So what does this mean and how can I incorparate it into csharp.

thanks