cs_kickine81
Messages postés1Date d'inscriptionlundi 15 décembre 2008StatutMembreDernière intervention17 décembre 2008
-
17 déc. 2008 à 20:26
tovin
Messages postés164Date d'inscriptionsamedi 11 décembre 2004StatutMembreDernière intervention14 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 !
tovin
Messages postés164Date d'inscriptionsamedi 11 décembre 2004StatutMembreDernière intervention14 août 20133 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