The text box attached to the form on all 4 sides does not display correctly

I have a problem trying to bind a text box to a form on all 4 sides. I added a text field to the form and set the Multiline property to True and Anchor in Left, Right, Up, and Down so that the text field expands and contracts with the form at runtime. I also have several other controls above and below the text box.

The anchor works correctly in Visual Studio 2005 (i.e. I can resize the form and limit its size, as expected), but when I start the project, the bottom of the text field expands to the bottom of the form, behind other controls that are usually appear underneath. This problem occurs when the form is loaded before an attempt is made to resize. Text box pinning is correct for the top, left, and right sides; only the lower part is defective.

Has anyone heard of this, and if so, could you find a solution?

Thank!

UPDATE:

Here are some of the designer code as requested by Greg D (I only include what is related to the text field itself, and not to other controls):

Friend WithEvents txtRecommendationText1 As System.Windows.Forms.TextBox

<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
    Me.txtRecommendationText1 = New System.Windows.Forms.TextBox

    ' ...snip...

    'txtRecommendationText1

    Me.txtRecommendationText1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                Or System.Windows.Forms.AnchorStyles.Left) _
                Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
    Me.txtRecommendationText1.Location = New System.Drawing.Point(4, 127)
    Me.txtRecommendationText1.Multiline = True
    Me.txtRecommendationText1.Name = "txtRecommendationText1"
    Me.txtRecommendationText1.Size = New System.Drawing.Size(223, 149)
    Me.txtRecommendationText1.TabIndex = 10
End Sub

OTHER UPDATE:

, , ( User Control, , , ), , . .NET Framework, .

+3
4

, , ( User Control, , , ), , . .NET Framework, .

+2

Form ? Textbox.Size, delete reset .
Form Textbox baseform? Textbox .
? , .
Textbox.MinimumSize/MaximumSize? .

...

+3

, , ? , Height MinimumHeight/MaximumHeight?

, .:)

, , - DPI. / DPI, , , .

. (, ), ? , , .

- ? . , () , , .

+2

- , AutoScaleMode InitializeComponent(). "" , . .

+2

All Articles