Hi Guys,
I have a custom title bar(TitleBar) with custom minimize,maximize and close buttons.
I need a code to make a form following behaviours :
1)Minimize the form.
2)Normal i.e like Form.SindowState = vbNormal

i found the code to maximize from the below post :
http://www.vbforums.com/showthread.php?t=394260

In form load I use the maximize code from above link. Now the question is when the user clicks minimize form button how to minimize? and when the user double clicks the TitleBar how to bring form to Normal?
The answer should depend on the above link. Because thats the code I used to Maximize.
Please reply.

The maximize code(from above link) is :
Code:
   1.
      Option Explicit
   2.
   3.
      Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" ( _
   4.
                      ByVal uAction As Long, _
   5.
                      ByVal uParam As Long, _
   6.
                      lpvParam As Any, _
   7.
                      ByVal fuWinIni As Long) As Long
   8.
   9.
      Private Const SPI_GETWORKAREA As Long = 48
  10.
  11.
      Private Type RECT
  12.
          lLeft As Long
  13.
          lTop As Long
  14.
          lRight As Long
  15.
          lBottom As Long
  16.
      End Type
  17.
  18.
      Private Sub Form_Load()
  19.
          Dim deskRECT As RECT
  20.
         
  21.
          Call SystemParametersInfo(SPI_GETWORKAREA, 0&, deskRECT, 0&)
  22.
         
  23.
          With deskRECT
  24.
              Me.Move .lLeft * Screen.TwipsPerPixelX, _
  25.
                      .lTop * Screen.TwipsPerPixelX, _
  26.
                      (.lRight - .lLeft) * Screen.TwipsPerPixelX, _
  27.
                      (.lBottom - .lTop) * Screen.TwipsPerPixelX
  28.
          End With
  29.
      End Sub
Thank you.