Cursor disappears in Visual Studio 2015 - c#

When using Visual Studio 2015 Community Edition my cursor frequently disappears when I perform the Ctrl+. shortcut to resolve missing dependencies. For example, if I am creating a new Entity Framework entity and want to add the [Required] attribute to one of my properties:
Type [Required]. The attribute gets a red squiggly underline.
Click Ctrl+. to bring up the suggested imports
Select the using System.ComponentModel.DataAnnotations option using the arrow keys
Press Enter to select it and import the using statement
Sometimes I can continue coding without any issues. But most of the time my cursor disappears and I have to click back on the code editor to get my cursor back.
It happens to me on several different computers using Windows 7, Windows 8.1, or Windows 10. I've tried resetting my VS2015 configurations to default, but it didn't seem to help. The only other thing I can think of that might be worth mentioning is that I'm use the Dark theme.
Has anyone else experienced this? Is there a setting change so that the editor keeps focus, or a keyboard shortcut to get the cursor back? It isn't the end of the world to use the mouse but I never had to do it in 2013 so it is slightly annoying.

I ran into the same issue, and found that if I went to my mouse properties and changed the default pointer for Text Select to one with white in it, I didn't lose the pointer in the editor. I don't know if this'll solve your issue, but it helped with mine.

I've had this problem as well, for me it seemed to be a glitch with the touch screen capabilities on my laptop. The cursor would disappear when using the track pad and moving into the work area in VS, and come back when I moved it outside to like solution explorer or similar.
Easily resolved by tapping the screen.

I had the missing cursor issue in VS 2015 Community Edition and it turns out the culprit was the Gotomeeting client software running on my desktop. I was accessing VS 2015 in an RDP session and as long as Gotomeeting was running on the desktop running the RDP client my VS 2015 cursor in the RDP session would disappear randomly.

I had the problem that the blinking cursor completely disappeared in Visual Studio 2017 (and probably other places as well). Found this old block post, that helped me:
I found the cause of the problem. I had also noticed that I did not have a text cursor (caret) in programs like Windows Live Mail. Somehow my caret size got changed to zero. The solution in Windows 7 was to go to Control Panel, Ease of Access Center, Make the computer easier to see, and under Make things on the screen easier to see set the thickness of the blinking cursor to 1 (mine was displaying a blank field). After applying the change, the text cursor displayed fine in Visual Studio Editor and Windows Live Mail.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/c7ba185e-1840-4649-984e-c12d5525baa2/cursor-not-visible-in-visual-studio-editor?forum=vseditor

None of the (many across web) posted solutions for the disappearing cursor worked. I found a solution that works for me go to:
Tools/Options/Environment/General/Window layout
there are 2 radio buttons:
Tabbed Documents
Multiple Documents
You must select one or the other. I switched to Multiple Documents and this solved the problem.
Details: this problem manifests when changing the focus to any other open window/application via Alt+Tab. On return, Vis Studio has no cursor visible. Ctrl+Tab is a sorry workaround, yet effective. But this fix is totally sat for me.

Try pressing the "insert" button. You might need to hold down the "fn" key for this.

Related

WPF controls in user input form visually corrupted

I have a a desktop application (C# Net 4.5) that contains a number of wpf input forms for user input. I have recently experienced corruption on the screen with some of the wpf controls as illustrated:
Buttons, comboboxes, radio buttons and checkboxes are all affected (a checkbox disappears when mouse hovers over it - see missing 'Deductible expense' checkbox in illustration)
The result is the same when running from within VisualStudio19 or running the separate .exe application.
Has anyone else experienced this behaviour and can suggest a fix?
I received an answer to this from a Microsoft Q&A:
Microsoft Q&A
Disabling a sound driver called Nahimic (through System Configuration to prevent it re-loading after a shutdown) fixed the distortion issue. Quite why a sound driver should affect visual rendering of the UI is beyond me, but the fix worked.
Thanks for providing the Microsoft link.
I did not have Nahimic installed, but I do have Sonic Studio.
Once I shut Sonic Studio down, the WPF distortions seem to have disappeared.

Visual Studio C# Form Designer not Allowing me to Select Elements

I'm fairly new to C#, I'm following along with an online tutorial, and I was working on building some forms when I noticed that the Visual Studio 2019 C# Form Designer was acting strangely. First every once in a while I would place an element on the form and then I wouldn't be able to select any other element, it would be stuck on that one element and clicking at all would cause the selected element to resize, rather than move like I would expect. That was annoying, but I was able to close the design window, and reopen it and it worked okay again, until it happened again usually after placing 2 or 3 elements with no issue.
But then a new problem started happening, where the place that I click on the design is offset to the left and down. So In order to select an element I have to move to the right and up, in order to be able to select the element I want to edit. The red rectangle in the picture below shows the spot where I would have to click in order to select the "Create Tournament" label. This is much worse than the first problem, and closing and reopening the design window doesn't help, nor does restarting Visual Studio or even resetting my computer. This is also happening across all of my forms. I was wondering if anyone knew what was going on or how I could fix this. Any help would be greatly appreciated, thank you.

Visual Studio display glitching out

I'm having a persistent problem with my VS2010. After working for a while, the display will start to glitch out. The code all shows as black-on-black (I use a dark background because it's easier on the eyes, but even when I switched to the default, it just makes the text white-on-white instead.) All tooltip hovers appear in the upper-left corner of the screen instead of where they're supposed to. If you select text, the code that gets selected is nowhere near where you clicked the mouse. (Not that you can read the text anyhow since it's the same color as the background.) And none of the dockable panels will appear or if they do they're all glitched out as well. The only solution seems to be closing the program and restarting it. I've been using this copy of VS2010 for years without issue, and my other projects don't seem to have any problems. This one is C#, uses a lot of Windows Forms (not WPF), has some customized Controls, but otherwise isn't all that unusual. I have the following extensions:
CodeMaid
CSharpIntellisensePresenter
InheritanceMargin
ProductivityPowerTools
Tunnel Vision Labs Output Window Services
WatermarkTextBox Control
Some of these are recently installed so they may be the culprits. Has anyone had any display problems with any of these extensions? I can live without most of them, but I'm not sure if it'll make a difference. There's no easy way to test it either, as the glitch only shows up every couple of hours or so.

Visual Studio 2012/2013 Navigation Back/Forward with Mouse confliting with Mouse Plugin

The Navigate Backward (Ctrl+-) and Forward (Ctrl+SHIFT+-) buttons on the IDE use to be controlled by the mouse lateral Back/Forward buttons in VS 2010.
In VS 2012, the mouse buttons only works in some cases, like going back after clicking in "Go To Definition" in a method call. They are not attached to the IDE buttons.
Trying to fix that, I've installed this plugin: Mouse Navigation
Well, it works fine until you use the "Go To Definition", after that, the embedded VS Back/Forward mouse functionality start to conflict with the plugin, resulting in messy behavior!
Am I the only one with this problem? I've tried to Google it, but I've found nothing.
This is really annoying! I hope someone can help me to solve that.
Edit:
As you can see at the marked answer, the plugin have been fixed by its developer thanks to this topic. The last version (2.2.0) is working fine.
Some clarifying:
Visual Studio (2012) separates the normal navigation from "click to go" navigation.
Normal navigation: mouse click anywhere in code editor, tab change also.
Click to go navigation: Go to definition, search result click. It is controlled by the buttons named: "Browse Back / Next" "Previous/Next Definition, Declaration or Reference". You can find it in the View custom toolbar.
The default VS mouse back/forward buttons are attached to the "Browse Back / Next" buttons, not to the Navigate back/forward.
The VS plugin Mouse Navigation sets the mouse buttons to the Navigate back/forward. The only remaining problem is that because VS doesn't consider "click to go" as normal navigation, when you click to go to a definition and try to go back using the Ctrl+- or mouse back, you will not return to the last position, but to the previous "Normal navigation" position.
My suggestion to the plugin developer is to try to make VS consider "click to go" navigation as normal ones, completely solving this issue.
I just updated the Mouse Navigation extension to improve reliability of the commands. For some reason I never updated the extension to properly use the new IMouseProcessorProvider interface when I migrated from Visual Studio 2008 to Visual Studio 2010, and that bug never bothered me enough to revisit the extension until today.
You should find that version 2.1.0 behaves properly in Visual Studio 2010-2013.
The reason it only half works without the plug-in is because the mouse forward/back buttons do not map to navigate forward/back but rather some other navigation command (which never made sense to me as to what it was doing).
The way I solved this problem is to use my mouse software (SetPoint from Logitech in my case) to bind mouse forward/back to CTRL+SHIFT+- and CTRL+- respectively, while Visual Studio is in the foreground. This leaves my back/forward buttons working correctly in other applications (web browser) but while in Visual Studio I get the expected functionality.
Also, Visual Studio 2013 does seem to have better mouse back/forward control... though I haven't been using it long enough to be able to say whether the problem is truly fixed.

Visual Studio 2013 C# Designer won't let me move controls

I am working on a project in Visual Studio 2013, and recently I have found that the controls on any form simply refuses to move when I use the mouse to drag and drop. Instead it lets me drag, then as soon as I move the cursor it snaps back into place. Then when I let go, it selects the control the cursor is hovering over.
The keyboard keys work fine, but I don't see why the program has simply changed the rules on me from a convenient system to an annoying and tedious one.
The controls are not locked and the problem effects every form. If it helps, I use Citrix as a thin client on my computer to access school programs.
Hi can you please check the CSS styles
setting:Tools--> Options-->HTML Designer-->CSS styling--> then check
the "Change position to absolute for controls added using toolbox,
paste or drag and drop" check Box.
It should work

Categories