hola, prueba con esto:pero eso lo mostraria en el textbox que tenga el primer formulario, y hay que mostrarlo en el segundo formulario.Código: Text
Private Sub DataGridView1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick Dim Fila_Seleccionada As Byte = CByte(Me.DataGridView1.CurrentCell.RowIndex) Me.TextBox1.Text = Me.DataGridView1.Rows(Fila_Seleccionada).Cells(3).Value.ToString End Sub
Private Sub DataGridView1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick
Dim Fila_Seleccionada As Byte = CByte(Me.DataGridView1.CurrentCell.RowIndex)
dim vector_de_datos(2) as integer
vector_de_datos(0) = Me.DataGridView1.Rows(Fila_Seleccionada).Cells(0).Value.ToString
vector_de_datos(1) = Me.DataGridView1.Rows(Fila_Seleccionada).Cells(1).Value.ToString
vector_de_datos(2) = Me.DataGridView1.Rows(Fila_Seleccionada).Cells(2).Value.ToString
dim frm2 as new SegundoFormulario()
frm2.cargardatos(vector_de_datos)
frm2.show()
End Sub
public sub cargardatos(vector_de_datos)
textbox0.text = vector_de_datos(0)
textbox1.text = vector_de_datos(1)
textbox2.text = vector_de_datos(2)
end sub
hola, pero puede hacer referencia al formulario no crees *-)Cita de: "Cajami"hola, prueba con esto:pero eso lo mostraria en el textbox que tenga el primer formulario, y hay que mostrarlo en el segundo formulario.Código: Text
Private Sub DataGridView1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick Dim Fila_Seleccionada As Byte = CByte(Me.DataGridView1.CurrentCell.RowIndex) Me.TextBox1.Text = Me.DataGridView1.Rows(Fila_Seleccionada).Cells(3).Value.ToString End Sub
1. podrias mandarselo como parametro en el NEW
2. puedes mandarselos en un procedure aparte.CitarPrivate Sub DataGridView1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick
Dim Fila_Seleccionada As Byte = CByte(Me.DataGridView1.CurrentCell.RowIndex)
dim vector_de_datos(2) as integer
vector_de_datos(0) = Me.DataGridView1.Rows(Fila_Seleccionada).Cells(0).Value.ToString
vector_de_datos(1) = Me.DataGridView1.Rows(Fila_Seleccionada).Cells(1).Value.ToString
vector_de_datos(2) = Me.DataGridView1.Rows(Fila_Seleccionada).Cells(2).Value.ToString
dim frm2 as new SegundoFormulario()
frm2.cargardatos(vector_de_datos)
frm2.show()
End Sub
y en el procedure cargardatosCitarpublic sub cargardatos(vector_de_datos)
textbox0.text = vector_de_datos(0)
textbox1.text = vector_de_datos(1)
textbox2.text = vector_de_datos(2)
end sub
BYTE
cabe recalcar que eso solo funcionaria en el 2005 ya que el My es una de las novedades que no tenia el 2003. (caramba que ayudaria bastante).Código: Text
Private Sub DataGridView1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick Dim Fila_Seleccionada As Byte = CByte(Me.DataGridView1.CurrentCell.RowIndex) My.FrmOtroFormulario.TextBox1.Text = Me.DataGridView1.Rows(Fila_Seleccionada).Cells(3).Value.ToString End Sub
lo que trataba de decirle era como sacar la info del registro seleccionado en el DataGridView, nos vemos :hola: