Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

button double click

Status
Not open for further replies.

slybitz

Technical User
Mar 25, 2005
113
US
ok this really seems like a simple problem but i cannot figure it out for the life of me. when i add a button to my form i want to be able to double click that button and have it perform an action. but for some reason i can not enter into the doubleclick handle when i double click on the button. for example when i double click on the button i would expect the below code to work but it does not. any ideas?

-------------
Code:
    Private Sub btnWTF_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnWTF.DoubleClick

        MsgBox("hello world")

    End Sub
-------------
 
Are you doing something with the click event?
Have you tried just running the event from another single click event?

Have you verified that you are actually clicking fast enough?

What is the purpose of changing the expeced behavior of a single click button to a double click?

BTW, you double posted, but the server went crazy for a second.

-Sometimes the answer to your question is the hack that works
 
yeah sorry for the double post. i'm not sure how that happened.

anyhow, the real purpose of the button is to remove items from a listbox. when i click once on the button it will remove the selected item from the listbox. when i double click i want to remove all items from the listbox. should be simple but double clicking does not work. running the event from the single click event works fine. if i remove the single click event and just add the double click event it doesn't work. i am clicking as fast as humanly possible. not sure what is going on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top