Results 1 to 2 of 2

Thread: Listbox Mouse Double Click

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2010
    Posts
    195

    Listbox Mouse Double Click

    I am developing an application and on the mouse double click event of my listbox, i added a msgbox to appear. But there is a problem with that.
    If scrollbars exist in the listbox and i double click on the scrollbars' arrows, the msg box appears. Is it possible to disable the mouse double
    click on the scrollbars and make the even work only on item's double click?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Listbox Mouse Double Click

    You should be able to call IndexFromPoint using the coordinates of the event to determine whether it was on an item or not and only display the message if it is. I haven't tested that theory but it seems like it should work.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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