MouseEvent on Form

Discussion in 'Microsoft VB .NET' started by Colin McGuire, Dec 3, 2003.

  1. Hi again - just another difficult question from me.

    If I have a form with the following code in it:

    Private Sub MouseUp(ByVal sender As Object,
    ByVal e As System.Windows.Forms.MouseEventArgs)
    Handles MyBase.MouseUp
    MsgBox "MouseUp"
    End Sub


    I see a dialog box appearing with the content "MouseUp" in it upon
    mouse button release. But if the mouse is released over the forms
    border, the message box doesn't appear. If there a way to catch this
    event, make the form border appear as though it were the form insides?

    Thank you again
    Colin
     
    Colin McGuire, Dec 3, 2003
    #1
    1. Advertisements

  2. "Colin McGuire" <> schrieb
    > Hi again - just another difficult question from me.
    >
    > If I have a form with the following code in it:
    >
    > Private Sub MouseUp(ByVal sender As Object,
    > ByVal e As System.Windows.Forms.MouseEventArgs)
    > Handles MyBase.MouseUp
    > MsgBox "MouseUp"
    > End Sub
    >
    >
    > I see a dialog box appearing with the content "MouseUp" in it upon
    > mouse button release. But if the mouse is released over the forms
    > border, the message box doesn't appear. If there a way to catch
    > this event, make the form border appear as though it were the form
    > insides?


    I can not reproduce this (Framework 1.1 on WinXP). I get the event no matter
    whether the cursor is over the client area of the Form, over the border or
    outside the Form.


    --
    Armin

    http://www.plig.net/nnq/nquote.html
    http://www.netmeister.org/news/learn2quote.html
     
    Armin Zingler, Dec 3, 2003
    #2
    1. Advertisements

  3. * (Colin McGuire) scripsit:
    > Hi again - just another difficult question from me.
    >
    > If I have a form with the following code in it:
    >
    > Private Sub MouseUp(ByVal sender As Object,
    > ByVal e As System.Windows.Forms.MouseEventArgs)
    > Handles MyBase.MouseUp
    > MsgBox "MouseUp"
    > End Sub
    >
    >
    > I see a dialog box appearing with the content "MouseUp" in it upon
    > mouse button release. But if the mouse is released over the forms
    > border, the message box doesn't appear. If there a way to catch this
    > event, make the form border appear as though it were the form insides?


    <http://www.mvps.org/dotnet/dotnet/samples/codingtechnique/downloads/Subclassing.zip>

    Watch for 'Private Const WM_NCLBUTTONUP As Int32 = &HA2'.

    --
    Herfried K. Wagner [MVP]
    <http://www.mvps.org/dotnet>
     
    Herfried K. Wagner [MVP], Dec 3, 2003
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob
    Replies:
    1
    Views:
    566
    Armin Zingler
    Jul 9, 2003
  2. Ken Powers

    Parent Form interacting with Child Form

    Ken Powers, Aug 26, 2003, in forum: Microsoft VB .NET
    Replies:
    4
    Views:
    297
    Herfried K. Wagner [MVP]
    Aug 26, 2003
  3. Rat
    Replies:
    2
    Views:
    206
    Herfried K. Wagner [MVP]
    Dec 1, 2003
  4. Christopher Lusardi

    How To Create New Form From Form Or Tabs On A Form

    Christopher Lusardi, May 17, 2006, in forum: Microsoft VB .NET
    Replies:
    3
    Views:
    194
    Christopher Lusardi
    May 18, 2006
  5. reidarT
    Replies:
    2
    Views:
    253
    Cor Ligthert [MVP]
    Dec 1, 2006
Loading...

Share This Page