Bonjour tous le monde,
je voudrai afficher une image dans un picturebox comme si on le fait avec picture.paintpicture, j'ai utilisé ce code ;
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
If (GDIPlusCreate()) Then
 
   Dim im As New GDIPImage
   im.FromFile App.Path + "\test.jpg"
 
   Dim gfx As New GDIPGraphics
   gfx.FromHDC (Picture1.hDC)
   gfx.InterpolationMode = InterpolationModeHighQualityBicubic
   gfx.DrawImageStretchL im, 0, 0, 0, 0, im.Width, im.Height, UnitPixel
 
   gfx.Dispose
   im.Dispose
 
   Picture1.Refresh
 
   GDIPlusDispose
End If
mais je ne récupére qu'une partie de l'image, comment puis je faire un stretch sur les dimension de mon picturebox.