So I've just discovered the little "bug" - I hope, when adding forms to another form. If the form in question behind added to another form contains a textbox. Then that textbox will behave in a no way normal fashion. It seems it has no response with the mouse. Yet keyboard interactions are normal. For example, using the mouse your unable to move the caret around or select any text at all. Simply you can double click - which highlights all the text, or clicking once which gives the textbox control focus, just the caret remains unchanged(to the far left most position).
This topic was difficult to locate through google, so I've tried some research before posting this. All examples I found were C++ and no one seemed to understand the OP's question.
Mine is how can I work around this? I've tried all suggestions I've found so far but none have worked. At this point I'm thinking my ONLY suggestion is to create my own textbox control, as I've already created a collection of controls, wouldn't hurt to add textbox to the list. But this would be time consuming and a lot more work. I'm not even sure if this would fix the problem if the problem is internal..
...any suggestions???
Code that produces the "bug"
vbnet Code:
Public Class Form1 Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim nForm As New Windows.Forms.Form() Dim nTextBox As New Windows.Forms.TextBox() nTextBox.Location = New Point(0, 0) nTextBox.Size = New Size(158, 20) nTextBox.Text = "Sample text" nForm.TopLevel = False nForm.Controls.Add(nTextBox) Me.Controls.Add(nForm) nForm.BringToFront() nForm.Show() End Sub End Class





Reply With Quote
