Solved

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

Posted on 2013-01-08
5
288 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
ID: 38757984
You can create the User Defined Froms and panels and you can utilize it.
0
 
LVL 2

Expert Comment

by:Mohamed_allabakash
ID: 38757985
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
ID: 38758000
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
ID: 38759436
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
ID: 38762038
Thanks for the advice
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

867 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

19 Experts available now in Live!

Get 1:1 Help Now