Can't Move Controls With Mouse on Windows Form Designer
Solution 1
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.
Solution 2
I had this happening using multiple monitors. Move VS to the main monitor (1) and all will work fine. Greetz
Solution 3
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...
- Moving VS to main monitor(1) - this worked for me, but still doesn't allow me to use my 2 monitors
- Run installer, select Repair
- Run and cancel your project
- Press the Esc button and see if things return to normal
- Right click form "Lock Controls". This should not have the blue outline, or right click on form/control>Lock Controls and make sure nothing is locked.
- Rebuild project, close and open the form again.
- Snap to grid setting - Tools>Options>Windows Form Designer>General
- Restart VS with 100% scaling - drawing may be an issue. I am not convinced it is not here since it works on the main screen but not the 2nd or 3rd
- Dock property set to none for form/controls
- Moving items very slowly with mouse - another indication drawing may be an issue.
- Controls may not be docked in the container in which they reside. Restart VS. Try double clicking on the control, then move. I think this is indicative of creating the control outside a container(say, on a form), dragging it into another container(say, a tabControl) and then it not moving within that tabControl. Additionally, try creating new controls within their intended container and then trying to move them.
- Close VS, delete C:\Users\user.name\AppData\Local\Microsoft\VisualStudio\15.0_xxxxxxxxx folder
- Mouse driver - some software may cause issues here.
- Absolute positioning - Tools>Options>Web Form Designer>CSS Styling>Change position...
- Right click any item under toolbox and select "reset toolbox"
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 /resetskippkgs, it will clear all SkipLoading tags that have been added to VSPackages by users who want to avoid loading problem VSPackages.
- devenv.exe /resetsettings, it will restore Visual Studio default settings. Optionally resets the settings to the specified .vssettings file.
- devenv.exe /resetuserdata, it will take a couple of minutes to run as Visual Studio cleans up and sets itself back to its original state. You may open Task Manager at this point to check whether the devenv.exe process is still running. After it has completed running, you can restart Visual Studio.
devenv.exe /uninstall /force - complete uninstall. Reboot. Reinstall. Rock on!
Solution 4
In my case, I had to change the Dock property to None.
Solution 5
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.
Related videos on Youtube
Brett Wolfington
I have a degree in Computer Science from Kansas State University. I am currently employed as the General Manager of the WV Great Barrel Company in Caldwell, WV. I manage a highly-automated whiskey barrel cooperage, which has allowed me a platform to apply my programming skills in a variety of ways. While programming is not my job, it is a powerful tool in my arsenal, and has allowed me to increase my productivity considerably. My expertise is primarily in the following areas and technologies: Computer Programming C# - ASP.NET, EF, Blazor, WinForms, UWP, Unit Testing, MS Office automation C++ - OpenCV, OpenGL, Network programming HTML/CSS Javascript (+jQuery), Typescript Angular PHP PLC control logic (Ladder, STL, FB) - Siemens and AB Typescript Software Microsoft Excel Microsoft Visual Studio (+ Code) Eclipse AutoCAD Minitab General Statistics (I'm a Six Sigma Black Belt) Mathematics & Numerical Analysis Outside of my job and my technical hobbies, I enjoy hiking, skiing, mountaineering, and rock climbing.
Updated on July 09, 2022Comments
-
Brett Wolfington almost 2 years
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:
- Controls can be moved with the keyboard
- Controls can be resized by dragging the keypoints on the outline of the control
- Controls can be aligned using the commands in the Tools menu
- Controls can be moved by setting the
Location
field manually in the designer property grid - Controls can be docked
- Controls cannot be moved with the mouse
Furthermore, 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:
- Created a new project & solution (same issue)
- Created a new form (same issue)
- Verified that the
Locked
property of both the form and controls is set toFalse
- Verified that the form inherits from
Form
(as expected, as this is a standard installation and the first time I've used it) - Googled for help (nothing that worked)
Any suggestions would be appreciated.
-
Lex Li about 10 yearsCannot reproduce. Please contact Microsoft support via support.microsoft.com
-
jhyap about 10 yearstry reinstall the VS2013?
-
TaW about 10 yearsFYI: The cross only shows for some more complicated container controls. It is not supposed to show for a simple button. Try a restart of VS and then of your PC first..
-
Brett Wolfington almost 9 yearsWhile I can't speak for everyone experiencing this problem, in my situation the error was not a drawing error or delay.
-
Fetchez la vache over 8 years"this won't work... I can drag windows about. See now I hit Escape and... Ooh! it works!." Have a vote :)
-
harsimranb over 8 yearsI had to restart my computer. Next time I will try this solution.
-
Zachary Cutler almost 8 yearsI had the same issue in the Workflow Designer and this solved that to. Thanks!
-
Marc Roussel over 7 yearsESC has no effect for me. Everything on the form is not movable with mouse. I can use the arrows and the controls move. I will try a restart of the computer since restarting VS 2015 Enterprise Update 1 has no effect either.
-
Marc Roussel over 7 yearsFinally it was a Windows 10 bug as we restarted the PC and it worked like a charm. We found out when we were not able to move icon on the desktop as well.
-
bjan about 7 yearsyes it is the case, move the mouse very slowly, when the control gets dragged then you can drag faster. In this case alignment suggestions don't work.
-
Amarnasan about 5 yearsHitting <ESC> worked for me. I can't believe it... Thank you, anyway!
-
nam almost 5 years@BrettWolfington I appreciate you sharing your solution, it resolved my issue. More importantly it was important that you marked your own response as an
Answer
- as it gets people attention more (as was the case with me). -
Eric F over 4 yearsThis worked for me! Strange.. and makes me wonder why it happens
-
A Burns over 3 yearsAlso worked for me December 2020, VS 2019
-
Diogo over 3 yearsAh! Finally a solution! Thanks ;)
-
Ben J almost 3 yearsWorked for me on VS 2019. Also, the controls that I couldn't move were inside a tab control. Controls outside the tab control (even on second monitor) were moveable.
-
Andreas over 2 yearsI had the same issue with the dataset designer in VS 2013 and pressing
ESC
let me move tables again. Thanks a million! -
John Foll over 2 yearsI had this same problem in VS 2019 too. Thanks for your solution!
-
Yeshurun Kubi about 2 yearsWorked for me as well. Strange that this strange bug is still there (April 2022, CS 2019).
-
Andrei Sfrent about 2 yearsSorry, what the... it worked indeed, does anyone know what is the deal? I even restarted VS, the problem was still there, so maybe it is a Windows issue as someone mentioned above. Still, I am dying to figure out how pressing Esc solves it... I am stunned.