The expected behavior when pressing enter on an IntelliSense suggestion in the Watch Window would be that the selected item is filled in and that I can continue typing.
Instead, the selection is filled in and then immediately executed so that I have to re-select the entry field each time.
This is obviously just a minor nuisance, but it would be great if someone knew how to change this behavior (or at least provide a shortcut that only enters the suggestion without immediately executing).
I agreed with Camilo and thanks for his help. To help improve this issue and help other community members handle and search similar issues, I have added an answer here:
Answer
Actually, how to invoke Intellisense on Watch Window is quite different from the Code Editor. And Enter key under watch window is for executing the detection of the input content. Every time you click the enter key on the watch window, it will monitor the values that have been entered.
Suggestion
So if you want to continue the pop-up suggestions for certain content on the Watch Window, you should use Tab key.
Related
I use Ctrl+M, Ctrl+M to collapse/expand modules in the text editor.
But since the last few days, it shows weird behaviour. I do not know how to grammatically describe the problem, hence I have not been able to google out a solution.
Pics are attached. How can I make it normal again?
Edit: How can I reset the vs-editor to default values (If there is such a thing)?
Thanks
Go to Options>Environment>Keyboard
Press the reset button step1
Secondly from the keyboard mapping scheme choose Visual C# 2005 step2
Alternatevly if this does not work press CTRL+M,CTRL+O and then press CTRL+M,CTRL+L and then try using CTRL+M,CTRL+M
Hope this helps
This is my first question on stackoverflow, so here goes:
I've got this annoying problem/feature in Visual Studio 2015. The problem is every time I create an if statement, for, while, etc. with autocomplete (tab-tab). When I then go to the line of the end bracket and try to create a new line (simple press of Enter) right after it, my text cursor will immediately jump into the brackets, instead of making a new line.
I've looked far an wide as for trying to disable this "feature" as it is incredibly annoying. But I have not been able to find any information on it anywhere, so now I am asking you all this question.
Thank you!
How I produce the problem:
Anywhere in a C# project, make a new if statement (while, for, etc. can be used too).
Navigate to just after the end bracket.
Press Enter to make a new line.
The marker will have jumped to the inside of the statement, instead of making a new line.
The 'problem' is that when using the tab key you are activating the snippets feature. After typing tab you are in 'snippet editing' mode, where each tab (and shift + tab) are used to navigate the placeholders defined by the snippet. In snippet mode, the Enter key always takes you wherever the person who designed the snippet thought it was the best place to leave the cursor after that snippet. For the if snippet that happens to be inside the brackets.
The good news is that you can create your own snippets, and even modify existing snippets to change their behaviour. However, as far as I know this involves manually editing snippet definition files (xml files) or using external extensions. For example: http://blogs.msdn.com/b/visualstudio/archive/2014/01/15/visually-creating-snippets.aspx
As a workaround, you can also just press Esc to exit snippet editing mode before pressing Enter.
Using the R# keyboard shortcut for formatting code presents the following window:
which forces me click the Run button every time.
Is there a way to bind a keyboard shortcut directly into the Reformat Code option, rather than just opening this dialog window?
Edit: To make things clear, I don't actually click the Run button with the cursor, I press Enter. (I still find it annoying, and wish for a direct shortcut.)
Oh sweet.. I just checked Tools -> Options -> Keyboard and found the command "ReSharper_SilentCleanupCode". It seems to execute ReSharper's code formatting function without popping up the dialog. Give it a try but try to not break your fingers... the default is ctrl-alt-shift-f :D That needs a rebind...
Although I can't answer the question directly I want to propose Ctrl-K-D as an alternative. This will invoke Visual Studio built-in formatting. It is less thorough but also less intrusive.
I'd like to show a messageBox in the setup.
Have how to put this messageBox into a Custom Action?
Because I want to this messageBox appears when one condition is satisfied.
If isn't clear, please, let me know!
EDIT:
I want to make a script to verify if the .exe that I'm trying to execute it's already installed, if don't --> execute, else --> do nothing.
My solution is w.r.t. Installshield 2014 but it is quite common use case to show an error message box during installation based on certain condition. So, this solution might help someone even in case you want to achieve it in an installshield version higher than Installshield 2009.
I achieved it through SpawnDialog control event as discussed below. Let's say you have a dialog with <Back, Next> and Cancel buttons. On the click of Next> button you want to make some check e.g. whether a service is up and running or not.
If service is down then you might want to show an error dialog popup instead of moving to the next wizard step. So this is how you setup your Next> button behavior as shown in the snapshot below:
Now you can notice the SpawnDialog event. I've set it to SetupErrorNew. What is SetupErrorNew? SetupErrorNew is also a dialog. I created it by cloning pre-existing SetupError dialog template as shown in the snapshot below:
This dialog will show the error message that you desire. Few key things that we need to set on the new error message dialog SetupErrorNew as below:
Set the Error Dialog property of the dialog to False.
Error dialog has a number of buttons for Yes, No, Ok, Cancel, Retry, Abort, Ignore options. Delete all buttons except Ok button.
Set the appropriate error message text.
Under Behavior -> For Ok button change the argument value of EndDialog event to Return as shown in the snapshot below:
Use an InstallScript function, there you have a MessageBox().
I am working on an application that has multiple dockable panels like Visual Studio. At some point the accelerator keys for the menu stopped working. They sometimes work depending on what panel is currently active. When they are not working pressing the alt key sets the focus to the menu bar and shows the underscores under the appropriate characters, but pressing any of the characters does not show the menu.
I've been banging my head against this for a little bit and am wondering if there is an easier way to find out what is happening to those key presses.
The first place to look is in any key press handlers within your code. I would set a breakpoint in all of those and see if those event handlers are stopping the key press from being bubbled up.
I found that there was a control that had overridden Control.ProcessMnemonic(). There was a logic error that was returning true when it should have been returning false.
Not exactly an easy error to find without spending a lot if time.