Face, meet palm...
-
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 -
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 KreskowiakDave 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.)