With several of my methods, I sometimes encounter the following problem: I edit the form using the constructor (Visual Studio 2008, Windows Forms, .NET 2.0, VB.NET) to add components, only to find out later that some minor adjustments have been made ( for example, the size of the form suddenly changes by a few pixels), and the controls are deleted. This happens silently - event processing methods automatically also remove the suffix Handles, so they are never called, and there is no compiler error. I only notice much later or not at all because I work in a different field in the form.
As an example, I have a form c SplitContainercontaining Infragistics UltraListViewon the left, and UltraTabControl- on the right. I added a new tab and controlled it, and they worked perfectly. Later, I found out that the scrollbar of the list was unexpectedly invisible due to the fact that its size was turned off and at least one control was removed from another tab that I did not work on.
Is this a known issue with WinForms Designer or with Infragistics? Of course, I use version control, so I can compare the changes and combine the remote code, but this is a tedious process that should not be necessary. Are there any ways to avoid this? Is there a good reason for this?
One key is that the remote control can have code (such as an event handler Load) that is expected to be run at run time, rather than development time, and can throw an exception. Can Visual Studio remove a control?
source
share