DATAGRID
Citação:
Private Sub DTGV_Grid_RNC_CellDoubleClick(sender As Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DTGV_Grid_RNC.CellDoubleClick
Try
With DTGV_Grid_RNC
If .CurrentRow Is Nothing Then Exit Sub
Dim IDped As Integer = .Rows(.CurrentRow.Index).Cells(.Columns([Ô]ID[Ô]).Index).Value()
Frm_Cad_RNC.Inicio(2, IDped)
End With
Catch ex As Exception
Trata_Erro(ex)
End Try
End Sub
Sub Inicio(TPIni As Single, Optional IDPED As Integer = 0)
If Me.Visible = True Then
If Me.WindowState = FormWindowState.Minimized Then Me.WindowState = FormWindowState.Normal
Me.BringToFront()
End If
Me.CenterToScreen()
Me.Show()
If (TPIni = 2) And (IDPED > 0) Then
Preenche_Dados(IDPED)
End If
End Sub
eu uso assim!