The following is my code:
Form2
--------------------------
Expand|Select|Wrap|Line Numbers
- Sub Image(Byval CustomerID As String)
- Dim theImage As Image
- Dim filespec As String
- Dim scaleToPercent As Integer
- Dim imageAdjustmentPercent As Decimal
- Dim adjustedImageWidth, adjustedImageHeight As Integer
- filespec = "C:\Documents and Settings\Gary\My Documents\MP\" & CustomerID & ".jpeg"
- theImage = Image.FromFile(filespec)
- imageAdjustmentPercent = (scaleToPercent / 100)
- adjustedImageWidth = (theImage.Width * imageAdjustmentPercent)
- adjustedImageHeight = (theImage.Height * imageAdjustmentPercent)
- theImage = theImage.GetThumbnailImage(adjustedImageWidth, adjustedImageHeight, Nothing, Nothing)
- PictureBox1.Image = theImage
- Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
- scaleToPercent=ComboBox1.Text
Can someone edit my code so that the image resize once the integer in the comboxbox change.(default integer in combobox is 100)