troubleshooting Question

Visual Studio 2005 - VB - System.Drawing - FromStream() method not available

Avatar of jpbivona
jpbivona asked on
Programming.NET ProgrammingVisual Basic.NET
8 Comments2 Solutions1440 ViewsLast Modified:
I am trying to use the following line of code in Visual Studio 2005:
Imports System.IO
Imports System.Drawing

Sub Base64Convert(ByVal Base64MSG As String, ByRef ID As String, ByRef FName As String, ByRef LName As String)
    'Setup image and get data stream together
    Dim img As System.Drawing.Image
    Dim MS As System.IO.MemoryStream = New System.IO.MemoryStream

    Dim b64 As String = Base64MSG
    Dim b() As Byte

    'Converts the base64 encoded msg to image data
     b = Convert.FromBase64String(b64)
     MS = New System.IO.MemoryStream(b)

   'creates image
    img = System.Drawing.Image.FromStream(MS)

   'writes image for displaying
   img.Save(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) & "sig_" & ID & "_" & FName & "_" & LName & ".bmp", System.Drawing.Imaging.ImageFormat.Bmp)
   'cleaning up house
   End Sub

This line: img = System.Drawing.Image.FromStream(MS)
presents a syntax error saying 'FromStream is not a member of System.Drawing.Image'

When VS 2005 attempts to autocomplete as I type: System.Drawing.Image.
It only presents 3 choice, which are: Equals, FromHBitMap, and ReferenceEquals

Does anyone have any idea what is going on here?

Thanks much.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros