Results 1 to 3 of 3

Thread: Overlaping Handles...

  1. #1

    Thread Starter
    Member .Net16's Avatar
    Join Date
    Dec 2004
    Location
    Jackson, Georgia
    Posts
    42

    Overlaping Handles...

    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.
    .Net 2003

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Overlaping Handles...

    Why don't you try the Click event instead of the MouseDown?
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

    Thread Starter
    Member .Net16's Avatar
    Join Date
    Dec 2004
    Location
    Jackson, Georgia
    Posts
    42

    Re: Overlaping Handles...

    Doesn't work...
    .Net 2003

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width