We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
I have tried this: Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconExA" ( _ ByVal lpszFile As String, ByVal nIconIndex As Int32, ByRef phiconLarge As IntPtr _ , ByRef phiconSmall As IntPtr, ByVal nIcons As Int32) As Int32 Dim icoLarge As IntPtr Dim icoSmall As IntPtr ExtractIcon(strFile, 0, icoLarge, icoSmall, 1) Dim ico As Icon = Icon.FromHandle(icoLarge) Dim msX As New MemoryStream ico.Save(msX) rowFromTable.Item(strColName) = msX.GetBuffer objPic.Image = ico.ToBitmap AND I have tried this: Dim msX As New MemoryStream Dim objLogo As System.Drawing.Icon objLogo = Icon.ExtractAssociatedIcon(strFile) objLogo.Save(msX) rowFromTable.Item(strColName) = msX.GetBuffer objPic.Image = objLogo.ToBitmap I am trying to read an ICON and save it to a table in a database and display it on a picture image. Any time I import it, the resolution is terrible. The number of colors is terrible and the resolution are really bad