I have a strange behavior with a dynamically created TextBox-Control. The control is created in the handler of the Load-event of a dialog-form like this:
txtTitel = New System.Windows.Forms.TextBox
txtTitel.Name = "txtTitel"
txtTitel.BackColor = Color.White
txtTitel.ForeColor = Color.Blue
txtTitel.Location = New System.Drawing.Point(106, 185)
txtTitel.Size = New System.Drawing.Size(406, 20)
txtTitel.TabIndex = 7
txtTitel.Text = ""
Now the situation is, that in most cases it works fine. But a few of my customers report that the TextBox not appears on their dialog - it's not there! That's all, nothing more to say.
I appreciate any advice, hints or reports about known pitfalls with dynamically created controls which could explain this (sometimes) strange behavior and how I could fix it (I have to create this control dynamically due to some reasons).
BTW: The program is built with Visual Basic 2005. And the customers with trouble are spread about the OS's (XP, Vista, 7).
Re: Strange problem with dynamically created control
I now added .visible = True and hoped that the problem vanished. It seemed so. A dozen customers reported it works fine. But this morning again a customer emailed me the same old problem: text box isn't there!
It's really annoying! Does anybody know a solution???