Hola buenas necesito una ayuda , necesito pasar el contenido de un txt que e creado y tiene palabras ( una debajo de otra) pasarlo a un array q tengo ya creado
alguien puede ayudarme? gracias
alguien puede ayudarme? gracias
![:) :)](https://forum.elhacker.net/Smileys/navidad/smiley.gif)
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Dim matrizesp As String() = {"Hola", "casa", "pepe"}
Dim matrizing As String() = {"Hello", "house", "saluton"}
Dim prueba As New ArrayList()
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("Seleccione un idioma")
ComboBox1.Items.Add("Español")
ComboBox1.Items.Add("Ingles")
End Sub
Private Sub BotonTraducir_Click(sender As System.Object, e As System.EventArgs) Handles BotonTraducir.Click
Dim palabra As String = String.Format(TextBox1.Text)
'Dim numerotecleado As Integer = Integer.Parse(TextBox1.Text)
If TextBox1.Text = Nothing Then
MessageBox.Show("Introduzca una palabra o texto a traducir")
Else
If ComboBox1.SelectedIndex = -1 Then
MessageBox.Show("Seleccione un Idioma Original")
End If
If RadioButtonEsp.Checked + RadioButtonIng.Checked = False Then
MessageBox.Show("Seleccione un Idioma a Traducir")
End If
End If
For indice As Integer = 0 To matrizing.GetUpperBound(0)
If ComboBox1.SelectedItem = "Español" Then
If matrizesp(indice) = palabra Then
TextBox2.Text = matrizing(indice)
Exit For
End If
End If
If ComboBox1.SelectedItem = "Ingles" Then
If matrizing(indice) = palabra Then
TextBox2.Text = matrizesp(indice)
Exit For
End If
End If
Next
End Sub
Private Sub BotonSalir_Click(sender As System.Object, e As System.EventArgs) Handles BotonSalir.Click
Me.Close()
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedItem = "" Then
RadioButtonEsp.Enabled = False
RadioButtonIng.Enabled = False
End If
If ComboBox1.SelectedItem = "Español" Then
RadioButtonEsp.Enabled = False
RadioButtonIng.Enabled = True
End If
If ComboBox1.SelectedItem = "Ingles" Then
RadioButtonIng.Enabled = False
RadioButtonEsp.Enabled = True
End If
End Sub