I'm working on a VS2015 WINFORM VB.NET project on VS2019, after i've changed the image of a ImageView, VS2019 automatically added to all panels and lbls the Me.lstSCO.HideSelection = False and that broked lot of code and i had manually change it back to true or by removing it.
Is VisualStudio 2019 adding automatically HideSelection set to False?
If so how could i prevent it?
Related
I recently started to use Visual Studio 2022 Professional edition. Whenever I enable visual designer from :
Tools -> Options -> XAML Designer -> General
I check to enable the XAML designer:
When I restart the Visual Studio IDE, nothing is changed, and the option is unchecked again. I tried multiple times, and unfortunately, the XAML code is only visible while the XAML designer is always unchecked.
Hey I was having a similar issue.
Make sure you're opening the project via the actual C# project file and not through the folder explorer.
When dragging a control from the toolbox and dropping it in the Windows Forms designer, a message box appears with the message Object reference not set to an instance of an object.
After closing the message box, I can drop the control on the form without any other issue.
This happens on a new project as well. The error appears in both VS 2015 and 2017 (both community editions).
EDIT : This happens on any control, including custom ones. This started happening after I updated to the latest version of Windows 10 (17134.48).
Instead of dragging and dropping, Clicking on the control, then clicking on the form is the workaround working for me until they come out with a newer update.
This is new behavior as of Visual Studio 2017 Version 15.8.6 for me.
Hopefully this will help others that just kept dragging and dropping over and over like I was doing :-)
Experiencing the same issue on Microsoft Visual Studio Community 2019 Version 16.5.0. I found that I was not able to drag and drop controls while VS was open on my high DPI external monitor, but if I moved VS to my native laptop monitor, I was able to drag and drop the controls.
For Visual Studio 2017 I did not fix the problem, but I found a workaround:
went to C:\Users\user.name\AppData\Local\Microsoft\VisualStudio\15.0_e3603226
deleted all *.tbd, privateregistry.bin*, ApplicationPrivateSettings.xml files
deleted all files in ComponentModelCache folder
restarted Visual Studio as Administrator
it showed a message of updating the MEF files
drag and drop is NOT working. It keeps throwing the same error
BUT I can click on the item I want in the toolbox and then click on the designer without dragging and it works.
For Visual Studio 2015 I did not fix the problem, but I found a workaround:
went to C:\Users\user.name\AppData\Local\Microsoft\VisualStudio\14.0
deleted all *.tbd, *.lock, devenv.exe.config files
deleted all files in ComponentModelCache folder
restarted Visual Studio as Administrator
drag and drop is NOT working. It keeps throwing the same error
BUT I can click on the item I want in the toolbox and then click on the designer without dragging and it works.
I have also seen the same problem repeated today in Visual Studio 2019 (Today is June 27 2019). I am trying out the VS 2017 solution from CristisS (above). I have verified that the 'workaround' still throws the exception, however, you can immediately draw the tool onto the form.
I repeatedly run into the same issue. Seems to always be caused by running the Windows Forms designer on my secondary monitor. I don't know what causes it to misbehave, but moving Windows Forms Designer window back to my laptop screen always fixes the issue. Idk if it has something to do with scaling, or what, but it is a very repeatable issue that needs to be addressed.
Moving Visual Studio over from my hi res secondary monitor to my primary laptop monitor did fix the issue.
To use Visual Studio on my larger secondary monitor, I set my secondary monitor from 3840x2160 down to 2560x1440 and set scaling from 150% down to 100%
This lets me Drag and drop from the toolbox to the designer in Visual Studio 2019 (V16.11.3) without issue again.
I found two solutions, to this problem that they worked for my WPF project in VS2015
solution 1) Click on the icon "enable/disable project code" in the bottom of windows design(the last icon near the percentual of zoom)-->Put Disable.
solution 2) Dx mouse button on your file .xaml and apply your modify in blend , selecting the "Open in Blend..." menu.
That's all
Daniel.
An application that I've written (https://github.com/JuliusSweetland/OptiKey) requests UIAccess (to be able to be rendered above everything) and has a modal popup window styled using MahApps.Metro. When run on Windows 8/8.1 everything is fine, but on Windows 10 the popup window does not display (is not rendered anywhere), but is visible in the taskbar. Hovering over the thumbnail displays the preview, but the window can never be made visible.
I have narrowed the problem down to Windows 10 and whether the UIAccess="true" setting in the manifest is true/false (it is fine if set to false).
I initially thought the problem was linked to the .Net 2.0.0.0 runtime not being present on a default install of Windows 10, as the problem went away when I installed Snoop (which I think installed .Net 3.5 and so the 2.0.0.0 runtime), but to prove the fix I uninstalled .Net 3.5, which brought back the issue with the child window, and then re-installed .Net 3.5, which did NOT resolve the issue again.
I have tried the following:
Running application as admin = no fix
Updating all graphics drivers = no fix
Checking the event logs = nothing
Converting my child (popup) window to be non-modal = no fix
Converting my child (popup) window to be a standard Window class, rather than a MetroWindow (MahApps) = no fix
4 & 5 = no fix
Installing .Net 3.5 = no fix
The only thing that works is setting UIAccess="false", but I need it to be true.
N.B. UIAccess is working correctly on Windows 8.1, and I have fulfilled the requirements (adding UIAccess="true" to the manifest, signing the assembly, and running from a protected directory "Program Files")
Any idea what is going on?
Found the issue - as part of launching the child window I was setting the parent window's TopMost property to false (and then setting it back to its original value when the child window closed). Something about setting parentWindow.TopMost=false was causing the invisible child window problem. I removed the relevant lines (in this commit: https://github.com/JuliusSweetland/OptiKey/commit/e9031119a726518f54da94c64faceeee991b3747) and everything works again.
I'm working at huge project, which was converted from VS 2008 to VS 2012. Everything worked fine before, but now I have a problem in VS 2012.
Opening a form in VS Designer causes changes are made in that form. If I save that auto made changes, I can't open it anymore, cuz there are errors in it. Can I somehow force the designer not to make the auto changes?
I believe you can set the [filename].Designer.[extension] file as Read-Only, and while the designer will still make changes (shown by the asterisk that appears in the tab), they won't be automatically saved. And you'll have to answer "No" when asked to save changes. It's not the perfect way to preserve the layout code while developing the class behaviour, but it's doable.
We have an old project that is designed using VS2005 and WinForms. Everything works perfectly on Windows XP, but when I open the designer on Windows 7, everything breaks down.
The controls get sized to random size and some of them dissappear (or are moved to random coordinates).
What can we do to solve this issue? Should we switch to VS2008?
A newer version of VS should help, but i'd be surprised if this can't be fixed in 2005.
Try commenting everything out in the method where initializeComponent runs, or any properties that set UI change. You should find it easy enough, it's a method that has long lists of calls against the controls on the form.
The problem was that we used TableLayoutPanel inside a GroupBox and not on the form. When we added the TableLayoutPanel on the form and moved the GroupBox into it, the designer stays ok.