Solved

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

Posted on 2013-01-08
5
287 Views
Last Modified: 2013-01-10
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
Comment
Question by:murbro
5 Comments
 
LVL 2

Expert Comment

by:Mohamed_allabakash
Comment Utility
You can create the User Defined Froms and panels and you can utilize it.
0
 
LVL 2

Expert Comment

by:Mohamed_allabakash
Comment Utility
You can create the User Defined Forms and panels and you can utilize it
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 250 total points
Comment Utility
you would have to override the panels class to specify the defaultevent:
http://www.vb-helper.com/howto_net_default_event.html
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 250 total points
Comment Utility
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
 

Author Closing Comment

by:murbro
Comment Utility
Thanks for the advice
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now