Imports System.IO
Imports System.Drawing
Partial Class showimage
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim orginalimg, thumb As System.Drawing.Image
Dim filename As String
Dim inp As New IntPtr()
filename = Server.MapPath("Image\")
orginalimg = orginalimg.FromFile(filename)
thumb = orginalimg.GetThumbnailImage(100, 100, Nothing, inp)
Response.ContentType = "image/jpeg"
thumb.Save(Response.OutputStream, Imaging.ImageFormat.Jpeg)
orginalimg.Dispose()
thumb.Dispose()
End Sub
End Class
มันก็ฟ้องว่า ไม่ได้เป็น shared member ไรนี่แระครับ ไม่รู้ว่าจะแก้ยังไงดีช่วยหน่อยครับ