I have a TextBox with active multiline, to this textbox I have assigned the KeyUp event with the "Enter" key, with this the textbox content is passed to a global variable, and this in turn opens from another window; but when you open it in the other window and assign it to another textbox, it comes with garbage (What I put in the textbox and two small boxes)
They would know how to cast the content of the first textbox so that it does not send those squares.
How it is being sent from the main form is as follows:
Private Sub txtDescripcion_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtDescripcion.KeyUp
If e.KeyCode = 13 Then
If Trim(Replace(txtDescripcion.Text, "'", "")) <> "" Then
txtDescripcion.Text = Replace(txtDescripcion.Text, "'", "")
vglParBusq = txtDescripcion.Text
frmBuscaArticulo.ShowDialog()
End If
End If
End Sub
And the other way you are receiving is like this:
Private Sub frmBuscaArticulo_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
txtBusqueda.Text = vglParBusq
End Sub
The variable vglParBusq is a global variable