RcSepp
05-06-2006, 10:27 AM
Hi everyone
As one of the many people who try to make their own custom MS Paint I searched through this forum and found a nice methode of drawing without using the paint event (using graphics on a bitmap and copy the bitmap to the picturebox.image). But now I have two big problemes with that:
1: If I resize the picturebox after drawing a bit, I must make the bitmap bigger too to get a bigger space to draw on, but I haven't found out how to do that (bitmaps width and height properties are readonly).
2: The only way to get around point 1 would be to make the bitmap as large as the users screen at the beginning. If I do that, the painting methode gets really slow. Even if I solved point 1, there would still be the problem that the program gets too slow if the user draws on a big picturebox.
Please help me. Any methodes to speed this up are welcome, even if I had to rewrite my hole program.
Thanks for help
RcSepp
As one of the many people who try to make their own custom MS Paint I searched through this forum and found a nice methode of drawing without using the paint event (using graphics on a bitmap and copy the bitmap to the picturebox.image). But now I have two big problemes with that:
1: If I resize the picturebox after drawing a bit, I must make the bitmap bigger too to get a bigger space to draw on, but I haven't found out how to do that (bitmaps width and height properties are readonly).
2: The only way to get around point 1 would be to make the bitmap as large as the users screen at the beginning. If I do that, the painting methode gets really slow. Even if I solved point 1, there would still be the problem that the program gets too slow if the user draws on a big picturebox.
Please help me. Any methodes to speed this up are welcome, even if I had to rewrite my hole program.
Thanks for help
RcSepp