Well I'm using a picturebox to move and resize a form. Problem is, with the MouseDown event handler, the Double_Click event handler never fires. What am I to do?


VB Code:
  1. Private Sub PictureBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown
  2.         'drag picturebox/form
  3.         If e.Button = Windows.Forms.MouseButtons.Left Then
  4.             ReleaseCapture()
  5.             SendMessage(Handle.ToInt32, WM_NCLBUTTONDOWN, HTCAPTION, 0)
  6.         End If
  7.     End Sub


VB Code:
  1. Private Sub PictureBox1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.DoubleClick
  2.         'if window is in normal state, maximize
  3.         If Me.WindowState = FormWindowState.Normal Then
  4.             'maximize
  5.             Me.WindowState = FormWindowState.Maximized
  6.         Else
  7.             'set window to normal
  8.             Me.WindowState = FormWindowState.Normal
  9.         End If
  10.     End Sub


So basically a double click is just firing off the MouseDown event handler twice I suppose, because the Double_click event never gets fired.