Accueil > > > IMPRESSION D'INFORMATION SUR UNE FEUILLE FORMALISÉE
IMPRESSION D'INFORMATION SUR UNE FEUILLE FORMALISÉE
Information sur la source
Description
Voici un exemple de code que j'ai créer pour le boulot, c'est un code d'impression de données dans une feuilles sécu pour ortho... Je vous laisse le plaisir de lire PS: les objet auquels se refere le code existe dans plusieurs forms je ne peut pas vous en dire + , loi du silence "contrat oblige" @+
Source
- Private Sub imprimer_Click()
- Dim resum
- resum = MsgBox("Voulez-vous imprimer la période du plan de traitement ?", vbYesNo, "Imprimer le plan de traitement !")
-
- If resum = vbYes Then Form1.Fin = 20
- If resum = vbNo Then Form1.Fin = 25
-
- Form1.CMD.CancelError = True
- On Error GoTo ErrHandler
- Form1.CMD.ShowPrinter
- Dim Msg ' Déclare la variable.
- On Error GoTo ErrorHandler ' Définit la gestion
- ' des erreurs.
-
-
- Form1.imprim ' Imprime la feuille.
-
-
- Exit Sub
- ErrorHandler:
- Msg = "Impossible d'imprimer la feuille."
- MsgBox Msg ' Affiche le message.
- Resume Next
- ErrHandler:
- Exit Sub
- End Sub
-
-
-
- Sub imprim()
- Open App.Path + "\imprime.cfg" For Input As #1
- Input #1, Couleur_titre
- Input #1, Couleur_sous_titre
- Input #1, Couleur_texte
- Input #1, encrage
- Input #1, traitement
- Input #1, résultat_but
- Input #1, chevron_but
- Input #1, résultat_probléme
- Input #1, chevron_probléme
- Input #1, ID_N
- Input #1, ID_C
- Close #1
- noir = &H0&
-
- If Form1.Fin = 25 Then ID_C = 0 'n'imprime pas le plan de traitement
- If Form1.Fin = 20 Then ID_C = 1 'imprime le plan de traitement
-
-
- Printer.CurrentX = 0
- Printer.CurrentY = 0
-
- 'initialise les données
- diag = "Diagnostic : "
- nom = Form2.nom.Caption
- age = Date1.Value
- sexe = Form2.sexe.Caption
- Ss = Form1.ID_SS.Text
- dent = plan_traitement.Label31.Caption + plan_traitement.Label32.Caption
-
- Printer.ScaleMode = 6
- Printer.ScaleHeight = 220 '(x)
- Printer.ScaleWidth = 320 '(y)
-
- 'Titre
- Printer.ForeColor = Couleur_titre
- Printer.Font.Charset = 0
- Printer.FontSize = 22
- Printer.CurrentX = Printer.ScaleHeight / 2
- Printer.CurrentY = 0
-
- 'sous-titre
- Printer.ForeColor = Couleur_sous_titre
- Printer.FontUnderline = True
- Printer.Print Form1.Label2.Caption
-
- 'line
- Printer.Line (0, 20)-(220 + 95, 20)
- 'nom
- Printer.CurrentY = 25
- Printer.CurrentX = 0
- Printer.FontSize = 12
- Printer.Print Form2.Label57.Caption
- 'sexe
- Printer.CurrentY = 25
- Printer.CurrentX = Printer.ScaleHeight - 30
- Printer.Print Form2.Label59(0).Caption
- 'age
- Printer.CurrentY = 33
- Printer.Print Label31.Caption
- 'sécu
- Printer.CurrentX = Printer.ScaleHeight - 30
- Printer.CurrentY = 33
- Printer.Print Form1.Label14.Caption
-
- 'diagnostic
- Printer.CurrentX = 0
- Printer.CurrentY = 45
- Printer.Print diag
- Printer.CurrentX = 0
- Printer.CurrentY = 82
- Printer.Print Form2.Label23.Caption
- Printer.CurrentX = 0
- Printer.CurrentY = 100
- Printer.Print Form2.Label25.Caption
-
- 'caractéristiques
- Printer.CurrentX = 0
- Printer.CurrentY = 138
- Printer.Print plan_traitement.Frame7.Caption 'caractéristiques du traitement
-
- 'plan traitement
-
- Printer.CurrentX = 0
- Printer.CurrentY = 160
- Printer.Print plan_traitement.Frame1.Caption 'caractéristique du traitement
-
- 'encrage
- Printer.CurrentX = 190
- Printer.CurrentY = 82
- Printer.Print Form2.Label20.Caption ' calcul
- Printer.CurrentX = 270
- Printer.CurrentY = 82
- Printer.Print Form2.Label24.Caption 'gogn
-
- Printer.FontSize = 10
- Printer.CurrentX = 240
- Printer.CurrentY = 126
- Printer.Print Form2.Label13.Caption
- Printer.CurrentX = 246
- Printer.CurrentY = 130
- Printer.Print Form2.Label14.Caption
- Printer.FontSize = 12
-
- 'Cadre but
- Printer.Line (110, 42)-(315, 42)
- Printer.Line (110, 75)-(315, 75)
- Printer.Line (110, 42)-(110, 75)
- Printer.Line (315, 42)-(315, 75)
-
-
-
- 'probléme
- Printer.CurrentX = 160
- Printer.CurrentY = 45
- Printer.Print Form2.Label21.Caption
-
- 'but
- Printer.CurrentX = 240
- Printer.CurrentY = 45
- Printer.Print Form2.Label26.Caption
-
- '**************************************************************************
- 'date
- Printer.ForeColor = noir
- Printer.FontUnderline = False
- Printer.CurrentY = 15
- Printer.CurrentX = Printer.ScaleHeight + 30
- Printer.Print Format(Date, " dddd dd mmmm yyyy")
- Printer.ForeColor = Couleur_texte
-
- 'nom
- Printer.CurrentY = 25
- Printer.CurrentX = 50
- Printer.FontSize = 12
- Printer.Print nom
- 'sexe
- Printer.CurrentY = 25
- Printer.CurrentX = Printer.ScaleHeight - 3
- Printer.Print sexe
- 'age
- Printer.CurrentY = 33
- Printer.CurrentX = 55
- Printer.Print Format(age, " dddd dd mmmm yyyy")
- 'sécu
- Printer.CurrentY = 33
- Printer.CurrentX = Printer.ScaleHeight
- Printer.Print Ss
-
- 'line
- Printer.Line (0, 40)-(220 + 95, 40)
-
- 'chevron pb
- Printer.FillColor = chevron_probléme
- Printer.Line (160, 53)-(185, 63)
- Printer.Line (160, 70)-(181, 62)
-
- 'chevron but
- Printer.FillColor = chevron_but
- Printer.Line (240, 53)-(265, 63)
- Printer.Line (240, 70)-(261, 62)
-
- Printer.FillColor = noir
-
- 'print pb
- Printer.ForeColor = résultat_probléme
- Printer.CurrentX = 150
- Printer.CurrentY = 50
- Printer.Print Form2.Label58.Caption
- Printer.CurrentX = 160
- Printer.CurrentY = 50
- Printer.Print Form2.Label60.Caption
- Printer.CurrentX = 160
- Printer.CurrentY = 57
- Printer.Print Form2.Label61.Caption
- Printer.CurrentX = 185
- Printer.CurrentY = 57
- Printer.Print Form2.Label62.Caption
- Printer.CurrentX = 200
- Printer.CurrentY = 57
- Printer.Print Form2.Label63.Caption
- Printer.CurrentX = 150
- Printer.CurrentY = 66
- Printer.Print Form2.Label64.Caption
- Printer.CurrentX = 150
- Printer.CurrentY = 70
- Printer.Print Form2.Label65.Caption
- Printer.CurrentX = 165
- Printer.CurrentY = 70
- Printer.Print Form2.Label66.Caption
- Printer.CurrentX = 185
- Printer.CurrentY = 70
- Printer.Print Form2.Label67.Caption
-
- ' Print BUT
- Printer.ForeColor = résultat_but
- Printer.CurrentX = 240
- Printer.CurrentY = 50
- Printer.Print Form2.Label75.Caption
- Printer.CurrentX = 232
- Printer.CurrentY = 55
- Printer.Print Form2.Label74.Caption
- Printer.CurrentX = 255
- Printer.CurrentY = 55
- Printer.Print Form2.Label72.Caption
- Printer.CurrentX = 232
- Printer.CurrentY = 66
- Printer.Print Form2.Label69.Caption
- Printer.CurrentX = 255
- Printer.CurrentY = 66
- Printer.Print Form2.Label68.Caption
-
- '**********************************************
-
- Printer.ForeColor = Couleur_texte
- 'diagnostique
- Printer.FontSize = 10
- Printer.CurrentX = 20
- Printer.CurrentY = 50
- Printer.Print Form2.classe.Caption
- Printer.CurrentX = 20
- Printer.CurrentY = 53
- Printer.Print Form2.e.Caption
- Printer.CurrentX = 20
- Printer.CurrentY = 56
- Printer.Print Form2.croissance.Caption
- Printer.CurrentX = 20
- Printer.CurrentY = 59
- Printer.Print Form2.sn_fma.Caption
- Printer.CurrentX = 20
- Printer.CurrentY = 62
- Printer.Print Form2.Text46.Caption
- Printer.CurrentX = 20
- Printer.CurrentY = 65
- Printer.Print Form2.Text47.Caption
- Printer.CurrentX = 20
- Printer.CurrentY = 68
- Printer.Print Form2.Text48.Caption
- Printer.CurrentX = 20
- Printer.CurrentY = 71
- Printer.Print Form2.Text49.Caption
-
- 'dent
- Printer.CurrentX = 20
- Printer.CurrentY = 77
- Printer.Print " " + plan_traitement.Label31.Caption + plan_traitement.Label32.Caption 'invisibles
-
- 'diag sque
- Printer.CurrentX = 20
- Printer.CurrentY = 87
- Printer.Print Form2.Label38.Caption + " " + Form2.Text41.Text
- Printer.CurrentX = 20
- Printer.CurrentY = 92
- Printer.Print Form2.Label39.Caption + " " + Form2.Text45.Text
-
- 'diag facial
- Printer.CurrentX = 20
- Printer.CurrentY = 105
- Printer.Print Form2.Label19.Caption
-
- Printer.CurrentX = 20
- Printer.CurrentY = 110
- Printer.Print Form2.Label34.Caption + " " + Form2.Text42.Text
-
- Printer.CurrentX = 20
- Printer.CurrentY = 115
- Printer.Print Form2.Label18.Caption
-
- Printer.CurrentX = 20
- Printer.CurrentY = 120
- Printer.Print Form2.Label36.Caption + " " + Form2.Text43.Text
-
- Printer.CurrentX = 20
- Printer.CurrentY = 125
- Printer.Print Form2.Label37.Caption + " " + Form2.Text44.Text
-
- 'tableau encrage
- I = 0
- a = 0
- For I = 0 To 9
- a = a + 4
- Printer.Line (200, 85 + a)-(315, 85 + a)
- Next I
- Printer.Line (200, 89)-(200, 85 + a)
- Printer.Line (270, 89)-(270, 85 + a + 16)
- Printer.Line (315, 89)-(315, 85 + a + 16)
- Printer.Line (285, 89)-(285, 85 + a + 16)
- Printer.Line (300, 89)-(300, 85 + a + 16)
- I = 0
- For I = 0 To 3
- a = a + 4
- Printer.Line (270, 85 + a)-(315, 85 + a)
- Next I
-
- 'gogn
- Printer.ForeColor = encrage
- Printer.CurrentX = 303
- Printer.CurrentY = 83
- Printer.Print Form2.Text1.Text 'gogn
-
- Printer.ForeColor = noir
- Printer.CurrentX = 277
- Printer.CurrentY = 86
- Printer.Print "+"
- Printer.CurrentX = 292
- Printer.CurrentY = 86
- Printer.Print "0"
- Printer.CurrentX = 307
- Printer.CurrentY = 86
- Printer.Print "-"
-
-
- 'encrage label
- Printer.ForeColor = noir
- Printer.CurrentX = 201
- Printer.CurrentY = 90
- Printer.Print Form2.Label4.Caption
- Printer.CurrentX = 201
- Printer.CurrentY = 94
- Printer.Print Form2.Label6.Caption
- Printer.CurrentX = 201
- Printer.CurrentY = 98
- Printer.Print Form2.Label5.Caption
- Printer.CurrentX = 201
- Printer.CurrentY = 102
- Printer.Print Form2.Label7.Caption
- Printer.CurrentX = 201
- Printer.CurrentY = 106
- Printer.Print Form2.Label8.Caption
- Printer.CurrentX = 201
- Printer.CurrentY = 110
- Printer.Print Form2.Label9.Caption
- Printer.CurrentX = 201
- Printer.CurrentY = 114
- Printer.Print Form2.Label10.Caption
- Printer.CurrentX = 201
- Printer.CurrentY = 118
- Printer.Print Form2.Label11.Caption
- Printer.CurrentX = 201
- Printer.CurrentY = 122
- Printer.Print Form2.Label12.Caption
-
- Printer.CurrentX = 201
- Printer.CurrentY = 134
- Printer.Print Form2.Label16.Caption
- Printer.CurrentX = 201
- Printer.CurrentY = 138
- Printer.Print Form2.Label17.Caption
-
-
- Printer.ForeColor = encrage
- '+
- Printer.CurrentX = 271
- Printer.CurrentY = 90
- Printer.Print Form2.Text2.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 94
- Printer.Print Form2.Text3.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 98
- Printer.Print Form2.Text4.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 102
- Printer.Print Form2.Text5.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 106
- Printer.Print Form2.Text6.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 110
- Printer.Print Form2.Text7.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 114
- Printer.Print Form2.Text8.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 118
- Printer.Print Form2.Text9.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 122
- Printer.Print Form2.Text10.Text
-
- '0
- Printer.CurrentX = 286
- Printer.CurrentY = 90
- Printer.Print Form2.Text15.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 94
- Printer.Print Form2.Text16.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 98
- Printer.Print Form2.Text17.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 102
- Printer.Print Form2.Text18.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 106
- Printer.Print Form2.Text19.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 110
- Printer.Print Form2.Text20.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 114
- Printer.Print Form2.Text21.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 118
- Printer.Print Form2.Text22.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 122
- Printer.Print Form2.Text23.Text
-
- '-
- Printer.CurrentX = 301
- Printer.CurrentY = 90
- Printer.Print Form2.Text28.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 94
- Printer.Print Form2.Text29.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 98
- Printer.Print Form2.Text30.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 102
- Printer.Print Form2.Text31.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 106
- Printer.Print Form2.Text32.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 110
- Printer.Print Form2.Text33.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 114
- Printer.Print Form2.Text34.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 118
- Printer.Print Form2.Text35.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 122
- Printer.Print Form2.Text36.Text
-
-
- Printer.CurrentX = 271
- Printer.CurrentY = 126
- Printer.Print Form2.Text11.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 130
- Printer.Print Form2.Text12.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 134
- Printer.Print Form2.Text13.Text
- Printer.CurrentX = 271
- Printer.CurrentY = 138
- Printer.Print Form2.Text14.Text
-
- Printer.CurrentX = 286
- Printer.CurrentY = 126
- Printer.Print Form2.Text27.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 130
- Printer.Print Form2.Text24.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 134
- Printer.Print Form2.Text25.Text
- Printer.CurrentX = 286
- Printer.CurrentY = 138
- Printer.Print Form2.Text26.Text
-
- Printer.CurrentX = 301
- Printer.CurrentY = 126
- Printer.Print Form2.Text40.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 130
- Printer.Print Form2.Text37.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 134
- Printer.Print Form2.Text38.Text
- Printer.CurrentX = 301
- Printer.CurrentY = 138
- Printer.Print Form2.Text39.Text
-
-
- 'caractéristique du traitement
- Printer.ForeColor = Couleur_texte
- Printer.CurrentX = 10
- Printer.CurrentY = 145
- Printer.Print DEP.P1.Text
- Printer.CurrentX = 10
- Printer.CurrentY = 148
- Printer.Print DEP.P2.Text
- Printer.CurrentX = 10
- Printer.CurrentY = 151
- Printer.Print " " + DEP.P3.Text
-
- 'tableau plan
- I = 0
- a = 0
- For I = 0 To 8
- a = a + 4
- Printer.Line (40, 165 + a)-(240, 165 + a)
- Next I
- Printer.Line (40, 169)-(40, 165 + a)
- Printer.Line (200, 169)-(200, 165 + a + 4)
- Printer.Line (240, 169)-(240, 165 + a + 4)
- Printer.Line (200, 169 + a)-(240, 169 + a)
-
- ' détails
- Printer.ForeColor = noir
- Printer.CurrentX = 41
- Printer.CurrentY = 170
- Printer.Print plan_traitement.Text1.Text
- Printer.CurrentX = 41
- Printer.CurrentY = 174
- Printer.Print plan_traitement.Text9.Text
- Printer.CurrentX = 41
- Printer.CurrentY = 178
- Printer.Print plan_traitement.Text8.Text
- Printer.CurrentX = 41
- Printer.CurrentY = 182
- Printer.Print plan_traitement.Text7.Text
- Printer.CurrentX = 41
- Printer.CurrentY = 186
- Printer.Print plan_traitement.Text6.Text
- Printer.CurrentX = 41
- Printer.CurrentY = 190
- Printer.Print plan_traitement.Text5.Text
- Printer.CurrentX = 41
- Printer.CurrentY = 194
- Printer.Print plan_traitement.Text4.Text
- Printer.CurrentX = 41
- Printer.CurrentY = 198
- Printer.Print plan_traitement.Text24.Text
-
- 'mois
- If ID_C = 1 Then
- Printer.ForeColor = traitement
- Printer.CurrentX = 201
- Printer.CurrentY = 170
- Printer.Print plan_traitement.Text2.Text
- Printer.CurrentX = 201
- Printer.CurrentY = 174
- Printer.Print plan_traitement.Text3.Text
- Printer.CurrentX = 201
- Printer.CurrentY = 178
- Printer.Print plan_traitement.Text10.Text
- Printer.CurrentX = 201
- Printer.CurrentY = 182
- Printer.Print plan_traitement.Text11.Text
- Printer.CurrentX = 201
- Printer.CurrentY = 186
- Printer.Print plan_traitement.Text12.Text
- Printer.CurrentX = 201
- Printer.CurrentY = 190
- Printer.Print plan_traitement.Text13.Text
- Printer.CurrentX = 201
- Printer.CurrentY = 194
- Printer.Print plan_traitement.Text14.Text
- Printer.CurrentX = 201
- Printer.CurrentY = 198
- Printer.Print plan_traitement.Text25.Text
- End If
-
- 'total
- Printer.ForeColor = noir
- Printer.CurrentX = 180
- Printer.CurrentY = 202
- Printer.Print plan_traitement.Label3.Caption 'total
- If ID_C = 1 Then
- Printer.ForeColor = traitement
- Printer.CurrentX = 201
- Printer.CurrentY = 202
- Printer.Print plan_traitement.Text23.Text
- End If
-
-
- 'bas de page
- Printer.ForeColor = noir
- Printer.Line (0, 211)-(220 + 95, 211)
- Printer.CurrentX = 0
- Printer.CurrentY = 212
- Printer.FontSize = 8
- Printer.Print "ANALYSE DE ROOT Verssion: "; App.Major; "."; App.Minor; "."; App.Revision
- Printer.CurrentX = (Printer.ScaleHeight / 2) + 10
- Printer.CurrentY = 212
- Printer.FontSize = 8
- Printer.Print App.LegalCopyright
- Printer.CurrentX = Printer.ScaleHeight + 40
- Printer.CurrentY = 212
- Printer.FontSize = 8
- Printer.Print Fiche_cab.Dr1.Caption
- Printer.EndDoc
-
- End Sub
-
Private Sub imprimer_Click()
Dim resum
resum = MsgBox("Voulez-vous imprimer la période du plan de traitement ?", vbYesNo, "Imprimer le plan de traitement !")
If resum = vbYes Then Form1.Fin = 20
If resum = vbNo Then Form1.Fin = 25
Form1.CMD.CancelError = True
On Error GoTo ErrHandler
Form1.CMD.ShowPrinter
Dim Msg ' Déclare la variable.
On Error GoTo ErrorHandler ' Définit la gestion
' des erreurs.
Form1.imprim ' Imprime la feuille.
Exit Sub
ErrorHandler:
Msg = "Impossible d'imprimer la feuille."
MsgBox Msg ' Affiche le message.
Resume Next
ErrHandler:
Exit Sub
End Sub
Sub imprim()
Open App.Path + "\imprime.cfg" For Input As #1
Input #1, Couleur_titre
Input #1, Couleur_sous_titre
Input #1, Couleur_texte
Input #1, encrage
Input #1, traitement
Input #1, résultat_but
Input #1, chevron_but
Input #1, résultat_probléme
Input #1, chevron_probléme
Input #1, ID_N
Input #1, ID_C
Close #1
noir = &H0&
If Form1.Fin = 25 Then ID_C = 0 'n'imprime pas le plan de traitement
If Form1.Fin = 20 Then ID_C = 1 'imprime le plan de traitement
Printer.CurrentX = 0
Printer.CurrentY = 0
'initialise les données
diag = "Diagnostic : "
nom = Form2.nom.Caption
age = Date1.Value
sexe = Form2.sexe.Caption
Ss = Form1.ID_SS.Text
dent = plan_traitement.Label31.Caption + plan_traitement.Label32.Caption
Printer.ScaleMode = 6
Printer.ScaleHeight = 220 '(x)
Printer.ScaleWidth = 320 '(y)
'Titre
Printer.ForeColor = Couleur_titre
Printer.Font.Charset = 0
Printer.FontSize = 22
Printer.CurrentX = Printer.ScaleHeight / 2
Printer.CurrentY = 0
'sous-titre
Printer.ForeColor = Couleur_sous_titre
Printer.FontUnderline = True
Printer.Print Form1.Label2.Caption
'line
Printer.Line (0, 20)-(220 + 95, 20)
'nom
Printer.CurrentY = 25
Printer.CurrentX = 0
Printer.FontSize = 12
Printer.Print Form2.Label57.Caption
'sexe
Printer.CurrentY = 25
Printer.CurrentX = Printer.ScaleHeight - 30
Printer.Print Form2.Label59(0).Caption
'age
Printer.CurrentY = 33
Printer.Print Label31.Caption
'sécu
Printer.CurrentX = Printer.ScaleHeight - 30
Printer.CurrentY = 33
Printer.Print Form1.Label14.Caption
'diagnostic
Printer.CurrentX = 0
Printer.CurrentY = 45
Printer.Print diag
Printer.CurrentX = 0
Printer.CurrentY = 82
Printer.Print Form2.Label23.Caption
Printer.CurrentX = 0
Printer.CurrentY = 100
Printer.Print Form2.Label25.Caption
'caractéristiques
Printer.CurrentX = 0
Printer.CurrentY = 138
Printer.Print plan_traitement.Frame7.Caption 'caractéristiques du traitement
'plan traitement
Printer.CurrentX = 0
Printer.CurrentY = 160
Printer.Print plan_traitement.Frame1.Caption 'caractéristique du traitement
'encrage
Printer.CurrentX = 190
Printer.CurrentY = 82
Printer.Print Form2.Label20.Caption ' calcul
Printer.CurrentX = 270
Printer.CurrentY = 82
Printer.Print Form2.Label24.Caption 'gogn
Printer.FontSize = 10
Printer.CurrentX = 240
Printer.CurrentY = 126
Printer.Print Form2.Label13.Caption
Printer.CurrentX = 246
Printer.CurrentY = 130
Printer.Print Form2.Label14.Caption
Printer.FontSize = 12
'Cadre but
Printer.Line (110, 42)-(315, 42)
Printer.Line (110, 75)-(315, 75)
Printer.Line (110, 42)-(110, 75)
Printer.Line (315, 42)-(315, 75)
'probléme
Printer.CurrentX = 160
Printer.CurrentY = 45
Printer.Print Form2.Label21.Caption
'but
Printer.CurrentX = 240
Printer.CurrentY = 45
Printer.Print Form2.Label26.Caption
'**************************************************************************
'date
Printer.ForeColor = noir
Printer.FontUnderline = False
Printer.CurrentY = 15
Printer.CurrentX = Printer.ScaleHeight + 30
Printer.Print Format(Date, " dddd dd mmmm yyyy")
Printer.ForeColor = Couleur_texte
'nom
Printer.CurrentY = 25
Printer.CurrentX = 50
Printer.FontSize = 12
Printer.Print nom
'sexe
Printer.CurrentY = 25
Printer.CurrentX = Printer.ScaleHeight - 3
Printer.Print sexe
'age
Printer.CurrentY = 33
Printer.CurrentX = 55
Printer.Print Format(age, " dddd dd mmmm yyyy")
'sécu
Printer.CurrentY = 33
Printer.CurrentX = Printer.ScaleHeight
Printer.Print Ss
'line
Printer.Line (0, 40)-(220 + 95, 40)
'chevron pb
Printer.FillColor = chevron_probléme
Printer.Line (160, 53)-(185, 63)
Printer.Line (160, 70)-(181, 62)
'chevron but
Printer.FillColor = chevron_but
Printer.Line (240, 53)-(265, 63)
Printer.Line (240, 70)-(261, 62)
Printer.FillColor = noir
'print pb
Printer.ForeColor = résultat_probléme
Printer.CurrentX = 150
Printer.CurrentY = 50
Printer.Print Form2.Label58.Caption
Printer.CurrentX = 160
Printer.CurrentY = 50
Printer.Print Form2.Label60.Caption
Printer.CurrentX = 160
Printer.CurrentY = 57
Printer.Print Form2.Label61.Caption
Printer.CurrentX = 185
Printer.CurrentY = 57
Printer.Print Form2.Label62.Caption
Printer.CurrentX = 200
Printer.CurrentY = 57
Printer.Print Form2.Label63.Caption
Printer.CurrentX = 150
Printer.CurrentY = 66
Printer.Print Form2.Label64.Caption
Printer.CurrentX = 150
Printer.CurrentY = 70
Printer.Print Form2.Label65.Caption
Printer.CurrentX = 165
Printer.CurrentY = 70
Printer.Print Form2.Label66.Caption
Printer.CurrentX = 185
Printer.CurrentY = 70
Printer.Print Form2.Label67.Caption
' Print BUT
Printer.ForeColor = résultat_but
Printer.CurrentX = 240
Printer.CurrentY = 50
Printer.Print Form2.Label75.Caption
Printer.CurrentX = 232
Printer.CurrentY = 55
Printer.Print Form2.Label74.Caption
Printer.CurrentX = 255
Printer.CurrentY = 55
Printer.Print Form2.Label72.Caption
Printer.CurrentX = 232
Printer.CurrentY = 66
Printer.Print Form2.Label69.Caption
Printer.CurrentX = 255
Printer.CurrentY = 66
Printer.Print Form2.Label68.Caption
'**********************************************
Printer.ForeColor = Couleur_texte
'diagnostique
Printer.FontSize = 10
Printer.CurrentX = 20
Printer.CurrentY = 50
Printer.Print Form2.classe.Caption
Printer.CurrentX = 20
Printer.CurrentY = 53
Printer.Print Form2.e.Caption
Printer.CurrentX = 20
Printer.CurrentY = 56
Printer.Print Form2.croissance.Caption
Printer.CurrentX = 20
Printer.CurrentY = 59
Printer.Print Form2.sn_fma.Caption
Printer.CurrentX = 20
Printer.CurrentY = 62
Printer.Print Form2.Text46.Caption
Printer.CurrentX = 20
Printer.CurrentY = 65
Printer.Print Form2.Text47.Caption
Printer.CurrentX = 20
Printer.CurrentY = 68
Printer.Print Form2.Text48.Caption
Printer.CurrentX = 20
Printer.CurrentY = 71
Printer.Print Form2.Text49.Caption
'dent
Printer.CurrentX = 20
Printer.CurrentY = 77
Printer.Print " " + plan_traitement.Label31.Caption + plan_traitement.Label32.Caption 'invisibles
'diag sque
Printer.CurrentX = 20
Printer.CurrentY = 87
Printer.Print Form2.Label38.Caption + " " + Form2.Text41.Text
Printer.CurrentX = 20
Printer.CurrentY = 92
Printer.Print Form2.Label39.Caption + " " + Form2.Text45.Text
'diag facial
Printer.CurrentX = 20
Printer.CurrentY = 105
Printer.Print Form2.Label19.Caption
Printer.CurrentX = 20
Printer.CurrentY = 110
Printer.Print Form2.Label34.Caption + " " + Form2.Text42.Text
Printer.CurrentX = 20
Printer.CurrentY = 115
Printer.Print Form2.Label18.Caption
Printer.CurrentX = 20
Printer.CurrentY = 120
Printer.Print Form2.Label36.Caption + " " + Form2.Text43.Text
Printer.CurrentX = 20
Printer.CurrentY = 125
Printer.Print Form2.Label37.Caption + " " + Form2.Text44.Text
'tableau encrage
I = 0
a = 0
For I = 0 To 9
a = a + 4
Printer.Line (200, 85 + a)-(315, 85 + a)
Next I
Printer.Line (200, 89)-(200, 85 + a)
Printer.Line (270, 89)-(270, 85 + a + 16)
Printer.Line (315, 89)-(315, 85 + a + 16)
Printer.Line (285, 89)-(285, 85 + a + 16)
Printer.Line (300, 89)-(300, 85 + a + 16)
I = 0
For I = 0 To 3
a = a + 4
Printer.Line (270, 85 + a)-(315, 85 + a)
Next I
'gogn
Printer.ForeColor = encrage
Printer.CurrentX = 303
Printer.CurrentY = 83
Printer.Print Form2.Text1.Text 'gogn
Printer.ForeColor = noir
Printer.CurrentX = 277
Printer.CurrentY = 86
Printer.Print "+"
Printer.CurrentX = 292
Printer.CurrentY = 86
Printer.Print "0"
Printer.CurrentX = 307
Printer.CurrentY = 86
Printer.Print "-"
'encrage label
Printer.ForeColor = noir
Printer.CurrentX = 201
Printer.CurrentY = 90
Printer.Print Form2.Label4.Caption
Printer.CurrentX = 201
Printer.CurrentY = 94
Printer.Print Form2.Label6.Caption
Printer.CurrentX = 201
Printer.CurrentY = 98
Printer.Print Form2.Label5.Caption
Printer.CurrentX = 201
Printer.CurrentY = 102
Printer.Print Form2.Label7.Caption
Printer.CurrentX = 201
Printer.CurrentY = 106
Printer.Print Form2.Label8.Caption
Printer.CurrentX = 201
Printer.CurrentY = 110
Printer.Print Form2.Label9.Caption
Printer.CurrentX = 201
Printer.CurrentY = 114
Printer.Print Form2.Label10.Caption
Printer.CurrentX = 201
Printer.CurrentY = 118
Printer.Print Form2.Label11.Caption
Printer.CurrentX = 201
Printer.CurrentY = 122
Printer.Print Form2.Label12.Caption
Printer.CurrentX = 201
Printer.CurrentY = 134
Printer.Print Form2.Label16.Caption
Printer.CurrentX = 201
Printer.CurrentY = 138
Printer.Print Form2.Label17.Caption
Printer.ForeColor = encrage
'+
Printer.CurrentX = 271
Printer.CurrentY = 90
Printer.Print Form2.Text2.Text
Printer.CurrentX = 271
Printer.CurrentY = 94
Printer.Print Form2.Text3.Text
Printer.CurrentX = 271
Printer.CurrentY = 98
Printer.Print Form2.Text4.Text
Printer.CurrentX = 271
Printer.CurrentY = 102
Printer.Print Form2.Text5.Text
Printer.CurrentX = 271
Printer.CurrentY = 106
Printer.Print Form2.Text6.Text
Printer.CurrentX = 271
Printer.CurrentY = 110
Printer.Print Form2.Text7.Text
Printer.CurrentX = 271
Printer.CurrentY = 114
Printer.Print Form2.Text8.Text
Printer.CurrentX = 271
Printer.CurrentY = 118
Printer.Print Form2.Text9.Text
Printer.CurrentX = 271
Printer.CurrentY = 122
Printer.Print Form2.Text10.Text
'0
Printer.CurrentX = 286
Printer.CurrentY = 90
Printer.Print Form2.Text15.Text
Printer.CurrentX = 286
Printer.CurrentY = 94
Printer.Print Form2.Text16.Text
Printer.CurrentX = 286
Printer.CurrentY = 98
Printer.Print Form2.Text17.Text
Printer.CurrentX = 286
Printer.CurrentY = 102
Printer.Print Form2.Text18.Text
Printer.CurrentX = 286
Printer.CurrentY = 106
Printer.Print Form2.Text19.Text
Printer.CurrentX = 286
Printer.CurrentY = 110
Printer.Print Form2.Text20.Text
Printer.CurrentX = 286
Printer.CurrentY = 114
Printer.Print Form2.Text21.Text
Printer.CurrentX = 286
Printer.CurrentY = 118
Printer.Print Form2.Text22.Text
Printer.CurrentX = 286
Printer.CurrentY = 122
Printer.Print Form2.Text23.Text
'-
Printer.CurrentX = 301
Printer.CurrentY = 90
Printer.Print Form2.Text28.Text
Printer.CurrentX = 301
Printer.CurrentY = 94
Printer.Print Form2.Text29.Text
Printer.CurrentX = 301
Printer.CurrentY = 98
Printer.Print Form2.Text30.Text
Printer.CurrentX = 301
Printer.CurrentY = 102
Printer.Print Form2.Text31.Text
Printer.CurrentX = 301
Printer.CurrentY = 106
Printer.Print Form2.Text32.Text
Printer.CurrentX = 301
Printer.CurrentY = 110
Printer.Print Form2.Text33.Text
Printer.CurrentX = 301
Printer.CurrentY = 114
Printer.Print Form2.Text34.Text
Printer.CurrentX = 301
Printer.CurrentY = 118
Printer.Print Form2.Text35.Text
Printer.CurrentX = 301
Printer.CurrentY = 122
Printer.Print Form2.Text36.Text
Printer.CurrentX = 271
Printer.CurrentY = 126
Printer.Print Form2.Text11.Text
Printer.CurrentX = 271
Printer.CurrentY = 130
Printer.Print Form2.Text12.Text
Printer.CurrentX = 271
Printer.CurrentY = 134
Printer.Print Form2.Text13.Text
Printer.CurrentX = 271
Printer.CurrentY = 138
Printer.Print Form2.Text14.Text
Printer.CurrentX = 286
Printer.CurrentY = 126
Printer.Print Form2.Text27.Text
Printer.CurrentX = 286
Printer.CurrentY = 130
Printer.Print Form2.Text24.Text
Printer.CurrentX = 286
Printer.CurrentY = 134
Printer.Print Form2.Text25.Text
Printer.CurrentX = 286
Printer.CurrentY = 138
Printer.Print Form2.Text26.Text
Printer.CurrentX = 301
Printer.CurrentY = 126
Printer.Print Form2.Text40.Text
Printer.CurrentX = 301
Printer.CurrentY = 130
Printer.Print Form2.Text37.Text
Printer.CurrentX = 301
Printer.CurrentY = 134
Printer.Print Form2.Text38.Text
Printer.CurrentX = 301
Printer.CurrentY = 138
Printer.Print Form2.Text39.Text
'caractéristique du traitement
Printer.ForeColor = Couleur_texte
Printer.CurrentX = 10
Printer.CurrentY = 145
Printer.Print DEP.P1.Text
Printer.CurrentX = 10
Printer.CurrentY = 148
Printer.Print DEP.P2.Text
Printer.CurrentX = 10
Printer.CurrentY = 151
Printer.Print " " + DEP.P3.Text
'tableau plan
I = 0
a = 0
For I = 0 To 8
a = a + 4
Printer.Line (40, 165 + a)-(240, 165 + a)
Next I
Printer.Line (40, 169)-(40, 165 + a)
Printer.Line (200, 169)-(200, 165 + a + 4)
Printer.Line (240, 169)-(240, 165 + a + 4)
Printer.Line (200, 169 + a)-(240, 169 + a)
' détails
Printer.ForeColor = noir
Printer.CurrentX = 41
Printer.CurrentY = 170
Printer.Print plan_traitement.Text1.Text
Printer.CurrentX = 41
Printer.CurrentY = 174
Printer.Print plan_traitement.Text9.Text
Printer.CurrentX = 41
Printer.CurrentY = 178
Printer.Print plan_traitement.Text8.Text
Printer.CurrentX = 41
Printer.CurrentY = 182
Printer.Print plan_traitement.Text7.Text
Printer.CurrentX = 41
Printer.CurrentY = 186
Printer.Print plan_traitement.Text6.Text
Printer.CurrentX = 41
Printer.CurrentY = 190
Printer.Print plan_traitement.Text5.Text
Printer.CurrentX = 41
Printer.CurrentY = 194
Printer.Print plan_traitement.Text4.Text
Printer.CurrentX = 41
Printer.CurrentY = 198
Printer.Print plan_traitement.Text24.Text
'mois
If ID_C = 1 Then
Printer.ForeColor = traitement
Printer.CurrentX = 201
Printer.CurrentY = 170
Printer.Print plan_traitement.Text2.Text
Printer.CurrentX = 201
Printer.CurrentY = 174
Printer.Print plan_traitement.Text3.Text
Printer.CurrentX = 201
Printer.CurrentY = 178
Printer.Print plan_traitement.Text10.Text
Printer.CurrentX = 201
Printer.CurrentY = 182
Printer.Print plan_traitement.Text11.Text
Printer.CurrentX = 201
Printer.CurrentY = 186
Printer.Print plan_traitement.Text12.Text
Printer.CurrentX = 201
Printer.CurrentY = 190
Printer.Print plan_traitement.Text13.Text
Printer.CurrentX = 201
Printer.CurrentY = 194
Printer.Print plan_traitement.Text14.Text
Printer.CurrentX = 201
Printer.CurrentY = 198
Printer.Print plan_traitement.Text25.Text
End If
'total
Printer.ForeColor = noir
Printer.CurrentX = 180
Printer.CurrentY = 202
Printer.Print plan_traitement.Label3.Caption 'total
If ID_C = 1 Then
Printer.ForeColor = traitement
Printer.CurrentX = 201
Printer.CurrentY = 202
Printer.Print plan_traitement.Text23.Text
End If
'bas de page
Printer.ForeColor = noir
Printer.Line (0, 211)-(220 + 95, 211)
Printer.CurrentX = 0
Printer.CurrentY = 212
Printer.FontSize = 8
Printer.Print "ANALYSE DE ROOT Verssion: "; App.Major; "."; App.Minor; "."; App.Revision
Printer.CurrentX = (Printer.ScaleHeight / 2) + 10
Printer.CurrentY = 212
Printer.FontSize = 8
Printer.Print App.LegalCopyright
Printer.CurrentX = Printer.ScaleHeight + 40
Printer.CurrentY = 212
Printer.FontSize = 8
Printer.Print Fiche_cab.Dr1.Caption
Printer.EndDoc
End Sub
Conclusion
il n'y aura pas de ZIP lol...
Sources du même auteur
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
Impression d'un richtextbox [ par momo ]
Je souhaite imprimer le contenu formaté d'un contrôle Richtextbox à partir d'un point quelconque de la feuille et sur la largeur voulue or la méthode
Problème d'impression d'une feuille [ par webseb02 ]
Bonjour a tousJ'ai une feuille à imprimer sur qui contient plusieurs labels, et un tableau que j'ai affiché sur la feuille à l'aide de printPour impri
PrintForm et impression A4 [ par NAIN ]
Bonjour,J'ai un gros souci!!!! Je dois imprimer une feuille au format A4 avec un graphique et diverses informations avec une mise en page tres stricte
Impression cellules [ par javoy43 ]
Bonjour à tous,je voudrais savoir s'il est possible d'imprimer une cellule sur la feuille ailleurs qu'a son endroit d'origine, à un emplacement bien p
double impression d'une Form ???? [ par cstan ]
Salut,j'ai un projet VB6 en cours et il faut que j'imprime absoluement une Form qui fait un peu moins que la moitié d'une feuille A4(portrait).Simple,
Question sur l'impression sous access 2000 ???? [ par jcconi ]
Voila j'aimerai imprimer a un momment x ce que j'ai a l'ecran! mais le PB c'est qu'il me le sort en grandeur nature et donc sur 4 feuille!!Moi ce que
Bouton de commande [ par Estelle2003 ]
Bonjour,Je suis débutante sous Excel 2000 et en VBA.J'ai un souci avec un bouton de commande.Mon bouton qui est sur ma feuille 1, j'aimerai qu'il soit
impression de la zone d'un controle dans une feuille [ par rober ]
RoberRoberbonjour,Je cale sur un pb d'impression de la fenetre d'un controle dans un feuille.Ce controle n'a pas la fonction d'impression possible (du
impression de rapports crystal report dans une feuille web form [ par patvail ]
salut à tousJ'ai développé une appli vb.net avec une feuille de type WEB form . Dans cette page je visualise un rapport crystal report 9. J'ai créer u
pb d impression images [ par smoron ]
salut!j ai une feuille avec une grosse image principale et plusieurs autres petites par dessus. les petites images sont en fait des logos donc n ont
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|