im trying to maximize my form using the sendmessage api, i know i can do it by just chaning the windows state, but im looking for the way to do it using the sendmessage api

VB Code:
  1. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  2.  
  3. Private Const WM_SIZE = &H5
  4.  
  5. Private Sub Command1_Click()
  6. SendMessage Me.hwnd, WM_SIZE, 2, 0
  7. End Sub
for some reason this wont work, using the WM_SIZE has the wParam 2 is = to maximizing