Bonsoir,
Je ne comprends pas cet histoire de "Option strict On disallows Late Binding".
Voici le code en question:
Les explications que je trouve sur internet ne sont pas tres claires ou alors il se fait tard et je devrais aller me coucher.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 Using fs As New FileStream(myPath, FileMode.Open, FileAccess.Read) Dim img As Image = Bitmap.FromStream(fs) ' Dim cloneRect As Rectangle = New Rectangle(0,0,200,200) Dim format As System.Drawing.Imaging.PixelFormat = img.PixelFormat ' Dim cloneBitmap As Bitmap = img.Clone(cloneRect, format) ' <= Option strict On disallows Late Binding cloneBitmap.Save("c:\bitmaps\test.jpg", System.Drawing.Imaging.ImageFormat.Jpeg) End Using
Peut-on m'expliquer ce probleme? Et encore mieux, le resoudre dans mon code.
Merci,
A+
JLuc01
Partager