We help IT Professionals succeed at work.
Get Started

Asp.net Graphics.FromImage question

foulkrj
foulkrj asked
on
658 Views
Last Modified: 2012-05-09
Hi,
I am just getting started with drawing in ASP.Net 3.5 using VisualStudio 2008.  I need to create floorplan drawings.  I'm having trouble creating the Graphics object to paint on.   I found a good video based done in C# in ASP.Net 2.0 where the Graphics object was created simply using Graphics.FromImage(b) where b is a bitmap object.  I have interpreted the simple code in VB.Net and I am trying to set my Graphics object to Graphics.FromImage(b).  I get the code error "FromImage is not a member of PermitPkg1.aspx.Graphics.  I know this is really simple but I've gone round and round and need some help
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Text
Imports System.Drawing.Imaging

Partial Public Class RoomLayout
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        'set up graphic object to paint on
        Dim b As New Bitmap(100, 100)
        Dim g As New Graphics
        g = Graphics.FromImage(b)


    End Sub

End Class

Open in new window

Comment
Watch Question
Staff Software Engineer
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE