Bonjour,
Je voudrais savoir comment on peut afficher plusieurs images dans un PictureBox?
Je veux pouvoir parcourir un dossier et afficher toutes les images qui existent.
Voici le code que j'ai écrit, mais il ne m'affiche qu'une photo:
Si quelqu'un pourrai m'aider!!
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 private Graphics graphics; foreach (string file in Directory.GetFiles(Dossier.Text)) { try { graphics = this.pictureBox1.CreateGraphics(); Image newImage = Image.FromFile(file); Point ulCorner = new Point(100, 100); graphics.DrawImage(newImage, ulCorner); } finally { if (graphics != null) graphics.Dispose(); } }
Merci d'avance.
Partager