Dear All,
How to show a image from the Database as a Thumbnails.I am using this code
to display the image from database.How to shrink the image to fit to the picturebox.
VB Code:
  1. Private Function ShowImageandDetailsFromDB(ByVal iErrorID As Long)
  2.         Dim imagecmd As OleDbCommand = New OleDbCommand("Select Top 1 Error_Description,Error_Image from photos where Error_ID='" & iErrorID & "'", con)
  3.         Dim imagereader As OleDbDataReader
  4.         imagereader = imagecmd.ExecuteReader
  5.         imagereader.Read()
  6.         Dim b(imagereader.GetBytes(1, 0, Nothing, 0, Integer.MaxValue) - 1) As Byte
  7.         imagereader.GetBytes(1, 0, b, 0, b.Length)
  8.         imagereader.Close()
  9.         Dim ms As New System.IO.MemoryStream(b)
  10.         picError.Image = Image.FromStream(ms) 'PicError it the Picturebox
  11.  
  12.     End Function
I want to show the image as Thumbnail

Dana