Awesome tip: make View Code default double click action on a WinForm control

Here is something I wish I'd known years ago - you can make the "View Source" action default when you double click on a WinForm control.

Here's how:

  1. Right click any Form/UserControl file, and choose Open With…
  2. Select CSharp Editor, then press Set as Default
  3. ????
  4. Profit!

That's it! Now you won't break the keyboard when you accidentally double click on your MainForm.cs file.

posted @ Sunday, May 10, 2009 2:51 PM

Print

Comments on this entry:

# re: Awesome tip: make View Code default double click action on a WinForm control

Left by Hadason at 11/8/2009 9:54 AM
Gravatar
I can't believe it was that simple. <br />This is one of the worst things Microsoft did in the IDE.

# re: Awesome tip: make View Code default double click action on a WinForm control

Left by speel backgammon online at 12/17/2009 12:04 PM
Gravatar
Useful information like this one must be kept and maintained so I will put this one on my bookmark list! Thanks for this wonderful post and hoping to post more of this!<br />

# re: Awesome tip: make View Code default double click action on a WinForm control

Left by Sean Kearon at 5/12/2009 1:14 PM
Gravatar
That is soooo sweet, I love it. It's made my day - thanks!

# re: Awesome tip: make View Code default double click action on a WinForm control

Left by Sean Kearon at 5/15/2009 6:15 PM
Gravatar
This also works with components so you can go the the code view and not open the form designer...even sweeter!

# re: Awesome tip: make View Code default double click action on a WinForm control

Left by hmemcpy at 5/18/2009 7:22 AM
Gravatar
Yeah.. :)<br />But there's still this urge to right-click, select View Code :)

# re: Awesome tip: make View Code default double click action on a WinForm control

Left by TItan at 5/21/2009 6:14 PM
Gravatar
Oh man! You saved my life! :) Thanks a lot.

# re: Awesome tip: make View Code default double click action on a WinForm control

Left by sicherste Casinos at 3/13/2010 2:27 AM
Gravatar
I have found one somewhat big problem with the implementation provided in that the stack trace doesn’t appear to be preserved from the server. I understand that this may actually be desirable depending on the amount of information that one desires to disclose to the client however I have found a hack that seems to be working for us in the meantime.

Your comment:



 (will not be displayed)


 
 
 
Please add 8 and 2 and type the answer here:
 

Live Comment Preview:

 
«September»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789