September 15th, 2011, 03:16 PM
Strange problem with dynamically created control
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).
Many thanks in advance
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!