Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8167703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:16:53+00:00 2026-06-06T20:16:53+00:00

I had a Visual Studio 2003 application that would render graphics to my web

  • 0

I had a Visual Studio 2003 application that would render graphics to my web page. It’s been a while since I used it, but I copied and pasted the code to a new 2008 Visual Studio Vb.Net project and the output to the screen is just a lot of symbols instead graphics.

I did a short test code and it won’t work. What am I missing?

    Dim X As Integer = 0
    Dim Y As Integer = 0

    'Build a BitMap that will act as the pallet and container 
    Dim objBitMap As New Bitmap(360, 360)
    'Declare your Graphics objects for painting graphics on your newly created bitmap.
    Dim objGraphics As Graphics
    objGraphics = Graphics.FromImage(objBitMap)
    objGraphics.Clear(Color.White)
    objGraphics.DrawLine(New Pen(Color.Red), 0, 0, 200, 200)
    objBitMap.Save(Response.OutputStream, ImageFormat.Gif)
    objBitMap.Dispose()
    objGraphics.Dispose()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:16:55+00:00Added an answer on June 6, 2026 at 8:16 pm

    You are just writing out the byte array to the response stream – assuming the default content type of text/html, the browser thinks it is getting HTML and is rendering what it gets as text.

    Change the content type to image/gif before outputting:

    Response.ContentType = "image/gif"
    objBitMap.Save(Response.OutputStream, ImageFormat.Gif)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a while now I have had visual studio producing builds that have all
When I used to develop in C++, I remember that Visual Studio had an
I've had an issue with Visual Studio that has been bugging me for some
I had developed an application in visual Studio 2005. whenever i run that application
We had the Power Commands for Visual Studio 2008 that add a context menu
I remember that in previous installations of Visual Studio that I had, when I
I had migrated my application from Visual Studio 2008 to Visual Studio 2010. Everything
I have several projects that I just upgraded from Visual Studio 2003 and ASP.NET
I guess that most people that use Visual Studio had my same reaction when
I had no problem with this in Visual Studio 2008 but it seems that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.