This question already has answers here:
C# hide and unhide comments
(6 answers)
Closed 1 year ago.
I need to hide some comments which cannot be collapsed in some cases. What is the best practice to do it?
There are some methods. But I prefer is using these two, since they are manageable:
Hide Selection command using shortcut keys:
Simply select your code either it's comment or working code and the just press:
Ctrl+M, Ctrl+H -> to hide (this simply collapse your selected section and make small box preview)
Ctrl+M, Ctrl+U -> to uhide
Try using region:
#region region_name
//your stuff
#endregion
Related
This question already has answers here:
Word wrap for a label in Windows Forms
(20 answers)
Closed 6 years ago.
I'm using Visual Studio to develop my application in C# and I have a little problem with one of my label like the below picture show :
My label go outside the window. I have no idea how I can make an auto line return on my label.
If someone have any idea ?
Thank you in advance !
PS : For French peoples, I know I have a typo on "enregistré" instead of "enregistrer".
Set your label's AutoSize property to false and expand your label manually. If neccessary, also apply Anchor properties to resize your label when your form gets resized.
This question already has answers here:
How can I customize the system menu of a Windows Form?
(5 answers)
Closed 8 years ago.
I want to add a "Dock" option here in the menu. I've seen a lot of posts on how to override those options but first, i have to add my new item there and after that, define the functionality for it.
You need to override the ContextMenu property of the control you want to add the option to.
http://msdn.microsoft.com/en-us/library/aa984254(v=vs.71).aspx is the MSDN article that explains how you can do this. it's doable both in the design mode and the code-behind.
This question already has answers here:
Setting the TabIndex property of many form controls in Visual Studio?
(4 answers)
Closed 9 years ago.
If there is an existing tab order on a large set of controls on a form, what is the easiest way to insert a control in the middle of that tab order without having to re-number the tab order of all the controls after the one inserted?
Visual Studio has a tool for that. It allows you to click the taborder you want - by selecting the control in the order you want:
the blue boxes(with white numbers) are the current taborder, and white boxes are the new taborder.
This might be helpful to you.
(new TabOrderManager(this)).SetTabOrder(TabOrderManager.TabScheme.AcrossFirst);
Follow this link>
http://www.codeproject.com/Articles/8406/Automatic-Runtime-Tab-Order-Management-for-Windows
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
C# Simulate Key Press
I need a way in C# to "type" Ctrl+H in code when a user clicks a button. I am working on a Word addin that customizes the ribbon. When a user clicks my "Replace" button, I want the Replace dialog to show. I can't figure out how to get to that dialog box, but Ctrl+H brings it up. Is there a way to do that?
Take a look here at handling different key combinations. Are you using VSTO?
EDIT: Just reread and understand you're looking at typing those keys! I'll adjust accordingly!
EDIT: The question here covers simulating key presses.
This question already has an answer here:
Closed 12 years ago.
Possible Duplicate:
changing button text in OpenFileDialog in C#.net
Have a good day,
Is there a way to override Open button in .NET OpenFileDialog?
I need to Change the button text and override OnClick event.
If this is not possible can I put a custom button over the Open button (but at the most top X order)?
--
BR
Murat
Everything is possible, but the question is what You really want to achieve by this strange behavior ?
What's wrong with standard usage of the OK button ? Where You pick the path and do what You want to.