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:
Private Sub PictureBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown 'drag picturebox/form If e.Button = Windows.Forms.MouseButtons.Left Then ReleaseCapture() SendMessage(Handle.ToInt32, WM_NCLBUTTONDOWN, HTCAPTION, 0) End If End Sub
VB Code:
Private Sub PictureBox1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.DoubleClick 'if window is in normal state, maximize If Me.WindowState = FormWindowState.Normal Then 'maximize Me.WindowState = FormWindowState.Maximized Else 'set window to normal Me.WindowState = FormWindowState.Normal End If 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.![]()


Reply With Quote