I experience a strange bug on Visual Studio 2019, and I want to know if you can reproduce it too on your project.
Usually, if you click on the form and then start dragging the mouse, you will see a selection dashed rectangle that shows which controls on the form will be selected. The problem I see is that if my Form is pretty large, for example 1900x995, then when I click and drag with the mouse on the right bottom area of the form, the selection rectangle is cut in the middle.
See this picture for better understanding:
https://i.ibb.co/xzZLfsD/VS219-Form1-Selection-Bug.jpg
If my calculations are right, then it looks like the selection rectangle is cut at about 1570x846 (if the Left-Top of the Form is 0x0).
To reproduce it, open a new project of type:
C# Windows Forms App (.NET Framework) A project for creating an application with a Windows Forms (WinForms) user interface.
Important note: It's not happening if I choose C# "Windows Forms App (a project template for creating a .NET Windows Forms (WinForms) App)".
Set the Form size to 1900x995, then click any point on the bottom-right area of the form, and start dragging with the mouse to the bottom right corner of the form.
Do you see the selection dashed rectangle cut out in the middle?
Please let me know, I want to know if it's happening only on my installation, or is it a bug in the Visual Studio 2019 itself.
If you have other version of Visual Studio, for example VS-2017, or VS-2020, please check it also. Maybe this problem occurs in other versions too and not only in 2019 version.
Thanks.
Related
Please make your answers noob friendly as I am not great in Visual Studio just yet.
I'm working on a Visual Studio 2017 Windows Forms app, I've added every button's function close, fullscreen, minimize, but I've noticed when I go into fullscreen, the contents you stay where they were how can I make it resize based if I'm in fullscreen or not, like the custom close button I made stays on the middle of the top when I click Fullscreen, but when in "Normal" windowed mode it stays at the end of the app Pictures showing my problem "
https://imgur.com/a/HZYbDJQ "
The first image is how I want it to be everywhere, second is how it is.
Also when I go fullscreen, it goes into windowed fullscreen, I want it to go into just windowed mode.
Thanks in advance for any help!
when I compile the program sometimes it looks like the top image and sometimes like the one on the bottom and I have no clue why
the text on the right is a simple textbox and picture on the left is a metroTile from metroFramework I'm using visual studio 2013, and the project is Windows form application
EDIT: i have a base form that every form inherit from it and this appears normal on all other windows, only on this windows which the main window it looks like this
I'm developing WinForm applications to Windows CE device. I have got a bug, on the top of the form(all form) have a 20 px height and full width zone, with topmost behaviour and Control color background, with cursor. On Visual Studio design mode can't see it just only on the device. Question is how to disappear it?
Thanks a lot
I'm willing to be that what you have there is a MainMenu with no MenuItems in it. It will show up as a blank strip across the top of the Form and cover any UI elements, but it won't show up in the designer.
How can I achieve the same alpha border effect that can be seen in the new Visual Studio 2012 main window using windows forms? Its window seems to glow.
So I am not sure if it is the best method, but if you use Spy++ (32-bit) and you look in the windows, you can see that beneath Visual Studio's main window, you can see 4 "VisualStudioGlowWindow" objects.
I hooked the messages in Spy++, and as you could imagine, the 4 windows represent the 4 glowing borders around the form. Further inspection shows that these 4 "glow windows" implement the WS_EX_LAYERED Extended window style, so the glow itself isn't done in WPF (as far as I can tell.)!
Hopefully this clears some stuff up.
AFAIK you can do it with WPF using a mix of this chrome and a custom WPF border. Not sure if on WinForms you can, given it's limited styling options (compared with WPF). Anyway they are using WPF.
Unless you want to handle drawing the entire form yourself you cannot. Because Visual Studio 2010 and Visual Studio 2012 are written on top of WPF and used Windows not Forms.
Visual Studio 2012 draw its window border using native Win32 functions. It is not related to the WPF or WindowsForms -- you can do it with both.
The glow is rendered on a transparent window on top of the main window. The main window calls the DWM API to set the glass area to 0. This way you can draw over the original border and the system buttons. This is the correct way to do this.
You can look at code of WPF Shell (http://archive.msdn.microsoft.com/WPFShell) to see how the calls to DWM are made in order to remove the glass. The fact that its written to be compatible with WPF doesnt matter, because all you need is a handle (IntPtr) to the window.
If you have a WindowsForms codebase, don't migrate to WPF. WPF has not been improved in the latest .NET framework release and there are no roadmaps to improvements or new features as its team has been integrated into Windows 8 team.
I have a Windows Form designed with Visual Studio 2010.
It has a ToolStripContainer with a StatusStrip control placed on the bottom.
From the Visual Studio IDE's Designer, the control looks fine:
When I run the application, the StatusStrip object on the bottom becomes transparent/opaque, and is very hard to read. This project is only about 2 weeks old, and I have not done anything to monkey with the transparency or opacity of any of the controls.
What could be causing this? How would I debug it?
EDIT:
So, I did a search on my Current Project on the control's name (statusStrip1). Unfortunately, there is very little information. I also ran a search on the ToolStripContainer, but it had roughly the same information - nothing that should cause the display to be transparent. The StatusStrip search result is shown below:
You won't believe this.
I stopped this problem by setting the WinForm's TransparencyKey to Fushsia (it was set on Transparent).