Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Face, meet palm...

Face, meet palm...

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasecomgraphicshelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dave Kreskowiak
    wrote on last edited by
    #1

    You know that feeling when you do something stupid and don't realize it until you've beat your brain to mush trying to fix it?? Yeah, try this on for size. Creating a converter to import images from a database (.BMP of all things!!) to something a bit more DB and web friendly, like PNG. Of course, I want to see the resulting images:

    using (Bitmap newBitmap = targetBytes.ToBitmap())
    {
        ... 
        TargetPictureBox.Image = newBitmap;
        ... 
    }
    

    The targetPictureBox just showed a nice big red X. For 2 hours I couldn't figure out why this code worked yesterday but didn't work today! I accidently put the using block around the wrong bit of code! :doh:

    A guide to posting questions on CodeProject[^]
    Dave Kreskowiak

    L 1 Reply Last reply
    0
    • D Dave Kreskowiak

      You know that feeling when you do something stupid and don't realize it until you've beat your brain to mush trying to fix it?? Yeah, try this on for size. Creating a converter to import images from a database (.BMP of all things!!) to something a bit more DB and web friendly, like PNG. Of course, I want to see the resulting images:

      using (Bitmap newBitmap = targetBytes.ToBitmap())
      {
          ... 
          TargetPictureBox.Image = newBitmap;
          ... 
      }
      

      The targetPictureBox just showed a nice big red X. For 2 hours I couldn't figure out why this code worked yesterday but didn't work today! I accidently put the using block around the wrong bit of code! :doh:

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      L Offline
      L Offline
      lewax00
      wrote on last edited by
      #2

      Dave Kreskowiak wrote:

      The targetPictureBox just showed a nice big red X. For 2 hours I couldn't figure out why this code worked yesterday but didn't work today!

      I was hoping the reason was going to be "the picture was a big red X". Oh well. (Then again, if that was the case, it wouldn't quite belong here I guess.)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups