Bonsoir, je viens de découvrir C sharp et j'ai réussi à faire une petite application qui charge une image bitmap depuis un dossier et génère aussi un Qr code à coté. J'ai fais des recherches sur l'impression d'un form et malgré les tuto et les avis sur le forum je n'arrive toujours pas à m’en sortir. Je souhaite imprimer l'image bitmap chargé et le qr code. Voilà la zone, encadrer en rouge, que je souhaite imprimer:
Nom : test.png
Affichages : 144
Taille : 71,5 Ko

Voici mon code sous VS 2015:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MessagingToolkit.QRCode.Codec;
using MessagingToolkit.QRCode.Codec.Data;
 
namespace Fiche_Individuelle
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
 
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            string url = textBox1.Text;
            QRCodeEncoder encoder = new QRCodeEncoder();
            Bitmap qrcode = encoder.Encode(url);
            pictureBox1.Image = qrcode;
        }
 
        private void button2_Click(object sender, EventArgs e)
        {
            SaveFileDialog SFD = new SaveFileDialog();
            SFD.Filter = "PNG|*.png|IPEG|*.jpeg|GIF|*.gif";
            if (SFD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                pictureBox1.Image.Save(SFD.FileName);
            }
        }
 
        private void button3_Click(object sender, EventArgs e)
        {
            OpenFileDialog OFD = new OpenFileDialog();
            if (OFD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                pictureBox1.ImageLocation = OFD.FileName;
            }
        }
 
        private void button4_Click(object sender, EventArgs e)
        {
            QRCodeDecoder decoder = new QRCodeDecoder();
            textBox1.Text = (decoder.decode(new QRCodeBitmapImage(pictureBox1.Image as Bitmap)));
            //MessageBox.Show(decoder.decode(new QrcodeBitmapImage(pictureBox1.Image as Bitmap)));
 
       }
 
        private void button5_Click(object sender, EventArgs e)
        {
            OpenFileDialog OFD = new OpenFileDialog();
            if (OFD.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                pictureBox2.ImageLocation = OFD.FileName;
            }
        }
 
        private void pictureBox2_Click(object sender, EventArgs e)
        {
 
        }
 
        private void button6_Click(object sender, EventArgs e)
        {
            FIprintPreviewDialog.Document = FIprintDocument;
            FIprintPreviewDialog.ShowDialog();
        }
 
        private void FIprintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {
 
        }
 
        private void FIprintPreviewDialog_Load(object sender, EventArgs e)
        {
 
        }
    }
  }
Quelqu'un peut me guider pour que puisse imprimer mon image bitmap et le qr code?