Reputation: 6627
I recently installed Visual Studio 2013 Professional, and found that in the Windows Forms Application project type I'm unable to move any controls on a form in design mode. I tested a few alternatives out and found the following:
Location
field manually in the designer property gridFurthermore, as you can see in the image below, the "cross" icon that indicates that the controls are movable is not visible on any controls.
I've tried the following, but have not yet been able to correct the issue:
Locked
property of both the form and controls is set to False
Form
(as expected, as this is a standard installation and the first time I've used it)Any suggestions would be appreciated.
Upvotes: 48
Views: 50262
Reputation: 538
In my case it was that a big 7-Zip file was dragged and dropped to an archive just before, a huge file. While this drag & drop was in progress Windows can't do another one. It's a global singleton operation. In .NET the call 'DragDrop.DoDragDrop()' throws an exception 'System.Runtime.InteropServices.COMException' with a message "A drag operation is already in progress" (or similar). A good programming style would have reported this exception to the user but Visual Studio simply ends the drag attempt without info. So, the solution in my case was to let the Drop finish or abort the whole operation.
Upvotes: 1
Reputation: 169
I know this is an older thread, but this problem still persists. I am putting this here because I think some of these may work for others. The top option works for me, but is by no means a permanent solution. It helps to get your project completed though. Design your forms on your main screen then move VS to your secondary monitor to code kinda thing. I work off a laptop, so I don't like working on a small screen.
Some steps are rudimentary, but I was trying to be thorough. Sometimes it's the simple solution.
Preliminary troubleshooting...
Requires Reboot...
Close VS. Delete some config files with current dates (devenv.exe.config, toolbox.tbd, toolbox_reset.tbd, toolboxindex.tbd, toolboxindex_reset.tbd) and reboot the PC. These are found in a directory like C:\Users\tdevy97\AppData\Local\Microsoft\VisualStudio\15.0_18c2eb4a where the last folder(15.0_18c2eb4a) is some random name. Reboot. Restart VS.
Corrupt toolbox? Close Visual Studio, Open the “c:\Users\AppData\Local\Microsoft\VisualStudio\14.0” folder and remove all the .TBD files, Start regedit, Find the “HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\ToolboxControlsInstaller_AssemblyFoldersExCache” and “HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\ToolboxControlsInstallerCache” keys, Remove everything from these keys leaving them empty, before you removing it, (back up your registry first), Reboot, Run Visual Studio again and wait until it recreates all items in the toolbox.
Last resorts...
Open command prompt as admin, navigate to your "IDE" directory (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE) and run the following commands...
devenv.exe /uninstall /force - complete uninstall. Reboot. Reinstall. Rock on!
Upvotes: 12
Reputation: 510
I had this happening using multiple monitors. Move VS to the main monitor (1) and all will work fine. Greetz
Upvotes: 37
Reputation: 1103
I had this issue and tried solving it using some of the aforementioned methods, including pressing Esc, rebooting, and deleting the folder in AppData, but none of these worked for me.
"Solution"
I have a dual screen setup, and what I eventually did notice is that if Visual Studio starts up on Screen 1 and is then moved to Screen 2, the components will snap back to their initial location after being clicked and dragged. After moving the Visual Studio window back to Screen 1, the components click and drag as usual. I am unsure of the cause of this since it never used to be a problem, but for anyone using dual/multiple screens, this may "solve" the issue.
Upvotes: 5
Reputation: 603
None of these solutions worked for me. These are the steps that worked for me:
After deleting, Visual Studio took some time to initialize but I could finally drag the controls.
Upvotes: 1
Reputation: 8404
Answer to a slightly different question, but my googling lead me here, so perhaps it helps someone else.
If no movement works, also not with keyboard, check the "locked" property. That was it for me in a colleagues project, so I was not aware he had locked it.
The controls also have a tiny lock icon so if you look closely you will notice.
Upvotes: 1
Reputation: 11
Found a solution!!
I had the same problem: Holding the mouse button and trying to move the element with no effects!
My solution: Try after pressing the mouse button to move the element very slowely - it works! I think it has maybe something to do with the mouse speed/acceleration settings. I changed them to the maximum. I guess VS has a problem with that. When i move the mouse slowely at the beginning then it works just fine!
Upvotes: 1
Reputation: 6627
It took some time but I finally found a workaround, if not an answer. As it happens, periodically my computer will stop allowing me to drag-and-drop anything. The solution to this is to press the Esc (escape) key, which instantly restores functionality.
Upvotes: 85
Reputation: 1159
I just found myself in similar, but slightly different situation - I could drag all controls without the "cross" icon such as buttons, but could not drag any control that had the "cross" icon such as group boxes and panels. One workaround that worked was to use the "arrow" keys to move the controls, but only a computer reboot fixed the issue. The solution, posted by Brett Wolfington did not work in my case.
Upvotes: 2
Reputation: 289
Seems its a drawing error. The controls actually moves, but there is a short time delay before you see it!
Upvotes: 0