I am receiving an error with a line of code I
have learnt from a tutorials site (after converting it from C# to VB):
Dim thumb As System.Drawing.Image = image.GetThumbnailImage(CInt(Math.Truncate(imgWidth)), CInt(Math.Truncate(imgHeight)), Function() False, DirectCast(0, IntPtr))
The error relates to the "IntPtr"
part, and reads:
"Value of type 'Integer' cannot be converted to 'System.IntPtr'"
Strangely, when this code was contained in a different class, there was no
issue with it! I have imported the following:
Imports System.Collections
Imports System.Collections.Specialized
Imports System.Configuration
Imports System.Text
Imports System.Text.RegularExpressions
Imports System.Web
Imports System.Web.Caching
Imports System.Web.SessionState
Imports System.Web.Security
Imports System.Web.Profile
Imports System.Web.UI
Imports System.Web.U ...
Go to the complete details ...