How to recover control deleted from ToolBox In Visual Studio? - visual-studio

I've deleted a tool from ToolBox by accident. How I can get it back if possible?

The standard way is to select the tab in the toolbox and select "Choose Items", this opens a window that allows you a list of controls to add, or you can browse to find the control in it's assembly if it is not there.
You can also restore the toolbox to the original configuration with a Right Click on the Toolbox and select "Reset Toolbox" (WARNING: This will give you the VS defaults. If you loaded any control libraries, you will lose them and have to reload them with their installer or "Choose Items").

Just right click any tool and select reset toolbox....you will get the deleted tool.

Disclaimer: This is based on memory.
Right click on Toolbox, you should get properties/configure or Add Control option. Select that option and a dialog box will appear listing all types (.net, COM) of control. Select the control that has gone missing and it should be back to your toolbox.

If reset toolbox does not help please try the following:
- right click on the blank toolbox area and select the option "Add/remove Items";
- click on the browse button;
- if 'Windows Forms' controls are missing navigate to:
C:\WINDOWS\Microsoft.NET\Framework\vx.xxxx\System.Windows.Forms.dll
- if 'Web' controls are missing navigate to:
C:\WINDOWS\Microsoft.NET\Framework\vx.xxxx\System.Web.dll
- and press OK.
The controls should then appear on the relevant tabs.

For Visual Studios or other visual stuff, to reset the toolbox and other tools click windows then go to reset windows layout.

Related

Visual Studio Solution Explorer, selected file changes when I click into Main Coding View [duplicate]

In my Visual Studio 2012 Solution Explorer, when I single click a filename it opens it. This was different from Visual Studio 2010 (required a double click). Is there a way to make double-click the 'view file' command?
This is called the Preview Tab feature. To change that behavior, go to:
Tools -> Options -> Environment -> Tabs and Windows
Then look for the "Preview Tab" section, and uncheck the options therein:
Option 1: Using icon in Solution Explorer
You can enable or disable the feature in Solution Explorer using the "Preview Selected Items" button.
The icon is a Tab aligned to the right.
Option 2: Using the Options window
You can enable or disable the feature by going into Tools > Options and then Environment > Tabs and Windows.
The Single-click opens files in the preview tab text mentioned in rubber boots' answer is missing in VS 2015. Mysteriously, a search for "single click" still brings up the Environment > Tabs and Windows option.
So for VS2015 and VS2017, either click the button in Vinicius's answer, or uncheck the Preview selected files in Solution Explorer box shown in the screenshot below.
In Visual studio 12/13, easiest way is to type "single click" in quick search and than select Tabs and Windows.
And in Tabs and Windows dialogue ,uncheck "Preview selected files in solutions explorer"
Shortcut Ctrl+Alt+Home.
If you press that in a document that was just opened, it will be opened permanently.
Item -> right click -> Open With -> Source Code (Text) Editor -> press Set as Default button
It's no longer there in VS2019. You enable/disable it through "preview selected Items" in Solution Explorer.

Visual Studio Property Window Search

As you know, some controls have many properties so it is difficult to find an specific property of a control in Properties window of Visual Studio. How can I search in Visual Studio Properties window?
Select the control that you are interested in, then open the properties dialog (right-click options, or press F4) you should see a box labelled 'Search Properties'.
See image.
If you like to show the search on property tap you have to install devexpress to your project and then add at least one tool from devexpress and then the "search" box will appear. I have tried it.

Toolbox containing no items when I'm editing a dialog

I'm maintainig an old MFC application with Visual Studio 2013. Building the application works fine, but I'm unable to use the dialog editor.
When I open a dialog from the resource view, it displays correctly, I can click on the existing items, view their properties, move them etc.
But when I open the toolbox via the View-Toolbox command (Ctrl+Alt+X), all I get is an empty toolbox as displayed below:
Right click on the toolbar and "Reset Toolbox" doesn't change anything
Right click and then "Show all" shows an impressive list of tools, among those there is the Dialog Editor, but all items are inactive as shown in the picture below:
On the other hand when I create a new MFC project from scratch, the toolbox containing the dialog items works fine.
Does anybody have an idea what could be wrong?
FYI: in the meantime I use Visual Studio 6 (yes) for editing the resources.
There are two typical work arounds to get the toolbox back in Visual Studio. One is to reset the toolbox as you've tried. The other is to delete the “.tbd” files in your corresponding C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\12.0 folder.

Visual Studio 2010 debugging options missing from toolbar

I haven't had much luck in finding an answer to this, I just switched computers and during debugging I noticed that only 'Step over' appears on the toolbar, there is no 'Step Into' or 'Step out'. Following some advice online I attempted going to Tools ->Customize ->Commands. I confirmed that the buttons are present under the 'Debug' menu bar (Although if I actually go to that Menu I once again only see 'Step over'). Some answers for Visual Studio 2008 said that its possible to drag and drop the commands, I haven't been able to do this either. Any suggestions?
if you right-click on the toolbar and select the option at the bottom which is "customize..."
then go to commands and select the radiobutton for toolbar.
go to the the item "debug" and click the button "Add command"
Good luck!
I was able to resolve this issue by going to Tools -> Import and Export Settings Wizard -> Reset all settings. Then just going through the wizard.

Visual Studio 2010 "Open With..." is missing?

I'm trying to change Visual Studio to open my code instead of designer by default. This question tells me to right click on a file and go to "Open With..."
However, when I try to right click on a file in my solution explorer I have no "Open With..." option. I'm not sure if this is caused by an extension (I have the CodeRush Xpress, VSCommands, Productivity Power tools, and VCS tools for SVN, Git, and Hg), or what, but I would like to be able to configure what my files open with.
Where do I need to go to either get the menu option back or change these settings?
The context menu can be modified. If you haven't heavily customized your command bars and menus then a full reset is wise. Tools + Import/Export, "Reset all settings" radio button.
Or fix the context menu. Tools + Customize, Commands tab, click the "Context menu" radio button. Select the "Project and Solution Context Menu | Item" option from the combobox. Click the Add Command button.
This MSDN link might help you:
How to: Change or Add a Default Editor
It's not the most intuitive method, but from the link:
On the File menu in Visual Studio, choose Open and then select File.
In the Open File dialog box, select a file of the type you want to change.
Still in the Open File dialog box, click the down arrow next to the Open button, and then select Open With.
In the Open With dialog box, choose an editor from the Select a program to open list.
Click the Set as Default button and then click the Open button to open the file.

Resources