• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

VB.net Windows Forms change default event generated when double clicking a panel

Hi

I have several forms where I need to add code behind the click event of a panel
When I cretae  a fresh Windows form and add a few panels to it then double click ecah one
it generates the Paint event. Is it possible to changea setting so that the click event is generated. I have a few hundred panels to do this to.
Thanks
0
Murray Brown
Asked:
Murray Brown
2 Solutions
 
Mohamed_allabakashCommented:
You can create the User Defined Froms and panels and you can utilize it.
0
 
Mohamed_allabakashCommented:
You can create the User Defined Forms and panels and you can utilize it
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you would have to override the panels class to specify the defaultevent:
http://www.vb-helper.com/howto_net_default_event.html
0
 
CodeCruiserCommented:
Work around is to not double click the panel. Just select the panel, then in properties window, double click the Click event and a stub handler will be created for Click event.
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks for the advice
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now