Click here to Skip to main content
15,891,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possible to change the Default Event of a control in Visual Studio ?

i.e; When we DBl click on a Textbox it Opens Code Editor window and the default Event is Text Changed. Can i change it to Click Event, So that it will come by default as click :(
Posted

Yes: couple of ways to do this: easiest is open the page in design view. Select the control, right-click, properties. Click the 'Events' button (looks like a lightning bolt). Select the event you require and either select a method you already have or double-click and it will create the event for you.
 
Share this answer
 
Thanks for Answering , It is a good answer , but i want to change the Default Behavior not for one control but for all the controls
 
Share this answer
 
Comments
R. Giskard Reventlov 12-Jul-10 9:53am    
Firstly, do not use an answer to respond; simply use a comment. Secondly, I have given you the answer if you stop to think and read my answer properly.
Sandeep Mewara 12-Jul-10 11:00am    
Reason for my vote of 1
Should be a cooment to the answer!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900