We have a custom design surface where users can select a base form and
create a derived form.

I'm deriving from CodeDomDesignerLoader for my loader, which was most
of the work.

A problem arises when a control on the base form is anchored to the
right side of the form, and then the derived form is resized.

In the case below, we resize the derived for to be ~200 pixels greater
than the base form. The controls are all explicitly declared with
their new sizes.

Once saved and reloaded in the designer, the controls on the derived
form are ~200 pixels greater right widths for the derived form. The
run off the right size of the form. Even if i save and close the app
and reload, they still appear this way. However, they work correctly
at runtime.

I figure this SuspendLayout/ResumeLayout are not getting called by the
designer in the right order, but this is difficult to confirm. What is
the visual studio designer be doing that I'm not doing?

Thanks in advance for any help!

The code for the derived form is below:

'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:2.0.50727.42
'
' Changes to this file may cause incorrect behavior and will be
lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict On
Option Explicit On


Namespace Elsinore.CustomForms

Public Class SearchFormEx
Inherits Elsinore.Engine.Windows.Forms.SearchForm

Public Sub New()
MyBase.New
Me.InitializeComponent
End Sub

Private Sub InitializeComponent()
Me.TextSearchControlsPanel.SuspendLayout
Me.SuspendLayout
'
'TextSearchControlsPanel
'
Me.TextSearchControlsPanel.Size = New
System.Drawing.Size(782, 168)
'
'MatchTypeComboBox
'
Me.MatchTypeComboBox.Size = New System.Drawing.Size(762,
21)
'
'TextSearchPropertiesPanel
'
Me.TextSearchPropertiesPanel.Size = New
System.Drawing.Size(762, 62)
'
'SearchStringTextBox
'
Me.SearchStringTextBox.Size = New System.Drawing.Size(762,
20)
'
'CustomControlsPanel
'
Me.CustomControlsPanel.Size = New System.Drawing.Size(782,
332)
'
'SearchFormEx
'
Me.Name = "SearchFormEx"
Me.Size = New System.Drawing.Size(782, 500)
Me.TextSearchControlsPanel.ResumeLayout(false)
Me.TextSearchControlsPanel.PerformLayout
Me.ResumeLayout(false)
End Sub
End Class
End Namespace