1 Attachment(s)
Annoying picturebox paint problem
Hi all, I've been trying to figure this out for a week now, but to no avail. Could someone please take a look at the included project? Basically, what I'm trying to do is paint bitmap images on an image bound to a picturebox, which in turn is on a tabsheet, which in turn is on a form. I can paint the bitmaps just fine, but when I minimize the app the image in the picturebox is the same as when I started. In other words, I lose any bitmap images I painted overtop . Any help on this is very much appreciated.
Thanks in advance
1 Attachment(s)
Solution to picturebox DrawImage problem
Hi folks, after many hours of painfully banging my heaqd against the wall, I came up with something that doesn't require the OnPaint event handler. From what I've seen after reviewing many examples of OnPaint, I simply don't understand why one would want to redraw form graphics every time the OnPaint event gets raised. While there are ways to implicitly invoke a custom handler, you have to parametize the hell out of it to still have access to other objects, such as MouseEventArgs. Anyways, I hope my example will help others such as myself who got stuck on this. I know there are probably more elegant (and proper) ways of doing this. If anyone who DOES know what would be the correct approach please feel free to respond to this thread. Thanks in advance.