The code below open a second form when the user click on the first column of the datagrid of the first form.
Private Sub DataGrid1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGrid1.MouseDown
Dim hti As System.Windows.Forms.DataGrid.HitTestInfo
hti = DataGrid1.HitTest(e.X, e.Y)
If hti.Type = System.Windows.Forms.DataGrid.HitTestType.Cell Then
If hti.Column = 0 Then
Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
Dim Prog As New Form4()
Prog.MdiParent = Me.MdiParent
prog.Label1.Text = ComboBox1.Text
prog.Label2.Text = TextBox1.Text
prog.Label4.text = DataGrid1.Item(hti.Row, hti.Column)
prog.Label5.text = DataGrid1.Item(hti.Row, 1)
If Not DataGrid1.Item(hti.Row, 2) Is DBNull.Value Then
prog.Label6.text = DataGrid1.Item(hti.Row, 2)
End If
Prog.Show()
End If
Cursor.Current = System.Windows.Forms.Cursors.Default
End If
End If
End Sub