Trying to add a double click event :(

glasswizzard

Well-known member
Joined
Nov 22, 2019
Messages
126
Programming Experience
Beginner
Hi, my program has a second form called frmHistoryForm, how do I add a double click event handler to it? If I double click on it creates a HistoryForm_Load() method, not a double click one.

Any help appreciated :)
Thanks
 
Last edited:
There are three ways to automatically create event handlers in VB.
  • Double-click a component or control in the designer to create a handler for the default event.
  • In the design window, open the Properties window, click the Events button and then double-click the event of interest. This will handle multiple events with a single method if you have selected multiple controls or components. You can also select an existing event handler in the drop-down for an event.
  • In the code window, use the navigation bar at the top, selecting the desired field in the middle drop-down and the desired event from the right-most drop-down.
 
Thanks for replying, could you tell me where the Events button is located please? I can't find it in my properties list. I'm using C# not Vb, will that make things different?

Edit: Found it :)
 
Sorry, I was thinking that I was still in our VB forum when I wrote. I forgot that I had switched to the C# forum. The first two options apply to C# as well but the third one is VB-specific.
 
could you tell me where the Events button is located please? I can't find it in my properties list.
It's not in the properties list because it's not a property. The Properties window isn't all that big and there are only a few buttons in it, so I think that you can probably find it with a bit of effort.
 
Back
Top Bottom