Probleme d'impression d'un form

cs_kickine81 Messages postés 1 Date d'inscription lundi 15 décembre 2008 Statut Membre Dernière intervention 17 décembre 2008 - 17 déc. 2008 à 20:26
tovin Messages postés 164 Date d'inscription samedi 11 décembre 2004 Statut Membre Dernière intervention 14 août 2013 - 11 sept. 2009 à 13:39
bonjour je suis novice en programmation et je suis bloqué voila j'essaye d'imprimer un form avec :

Private Sub ImprimerToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ImprimerToolStripButton.Click
PrintForm2.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.CompatibleModeClientAreaOnly)
quand je le lance j'ai bien la boite de dialogue pour choisir l'imprimante et puis apres j'ai visual basic 2008 qui me dis de mettre New mais je vois pas ou dans ma ligne !

un peu d'aide me serai utilise je vous remercie d'avance !

2 réponses

tovin Messages postés 164 Date d'inscription samedi 11 décembre 2004 Statut Membre Dernière intervention 14 août 2013 3
18 déc. 2008 à 07:33
Bonjour,
A supposer que l'impression soit lancée par button1, on a :


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ' Hide the print button
        Button1.Visible = False
        ' Set the PrintAction to display a Print Preview dialog        PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview
        ' Print a copy of the form
        PrintForm1.Print()
        ' Restore the print button
        Button1.Visible = True
    End Sub




A +
0
tovin Messages postés 164 Date d'inscription samedi 11 décembre 2004 Statut Membre Dernière intervention 14 août 2013 3
11 sept. 2009 à 13:39
Merci du renseignement
0
Rejoignez-nous