Any chance somebody can enlighten me as to where Im going wrong please, as this code does not error but does not draw the image on the button either
Code:
get the image to resize
Dim imgImage As Image = Image.FromFile("c:\anyjpg.jpg")
create a size object
Dim szNewImageSize As New System.Drawing.Size()
set the new size
szNewImageSize.Height = 100
szNewImageSize.Width = 100
load the resized image into bmpBitMap
Dim bmpBitMap As New Bitmap(imgImage, szNewImageSize)
create a graphics object from Button1
Dim gfxButton1 As Graphics = Me.Button1.CreateGraphics()
try to draw the image on the button
gfxButton1.DrawImage(bmpBitMap, 0, 0)