OpenFileDialog1

Résolu
Seb83390 Messages postés 4 Date d'inscription vendredi 29 mai 2009 Statut Membre Dernière intervention 18 septembre 2009 - 29 mai 2009 à 17:38
Seb83390 Messages postés 4 Date d'inscription vendredi 29 mai 2009 Statut Membre Dernière intervention 18 septembre 2009 - 29 mai 2009 à 17:54
Bonjour,

Je cherche a insérer une image dans une PictureBox a partir d'un OpenFile.
J'ai fait plusieurs recherche sur internet sans résultat.

Pouvez-vous me fournir les bon codes pour effectuer cela.

Cordialement Seb.
A voir également:

2 réponses

Mayzz Messages postés 2813 Date d'inscription mardi 15 avril 2003 Statut Membre Dernière intervention 2 juin 2020 28
29 mai 2009 à 17:47
Bonjour,

Voici pour toi :

Dim OFD As New OpenFileDialog
With OFD
    .Title = "Ins‚rer une image"
    .Filter = ("Tous fichiers images |*.wmf,*.jpg;*.jpeg;*.bmp;*.png;*.gif")
    .Multiselect = False
    If .ShowDialog = Windows.Forms.DialogResult.OK Then 
        PictureBox1.Image = New Bitmap(.FileName)
    End If
End With

@+ Mayzz.
3
Seb83390 Messages postés 4 Date d'inscription vendredi 29 mai 2009 Statut Membre Dernière intervention 18 septembre 2009
29 mai 2009 à 17:54
Sa marche.

Merci beaucoup Mayzz de ton aide a+
0
Rejoignez-nous