1

salut à tous

j'ai trouvé un exemple de code pour imprimer un datagrid.
le problème est que je n'arrive pas a modifier ce code pour mettre la grid où je veux sur la feuille...

Voila le code, pouvez-vous m'aider?

Private Sub ImprimerGrid_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) Handles PrintGrid.Click
PrintDocument1.Print()
End Sub

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, _
ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles _
PrintDocument1.PrintPage
Dim myPaintArgs As New PaintEventArgs(e.Graphics, New Rectangle(New _
Point(0, 0), Me.Size))
Me.InvokePaint(DataGrid1, myPaintArgs)
End Sub

MERCI