-
Monday March 26, 2001
I'm working on a drawing program in which the user has the option of changing the background color of the picture box.
Problem: when the user changes the picture box's background color, all work is lost. Every line, scribble, shape and doodle are forever vanished! Is there a way to change a picture box's background color while preserving one's work?
Sincerely,
danny7
[email protected]
-
I dont think so, at least not one that i can think of, except looping through each pixel, and if it is the old background color, set it to the new color. Its slow, but it will work.
Z.
-
You could also BitBlt is to a temporary buffer, then change the color and BitBlt it back... would be faster I think.
-
Try recording an array of operations, one that has all of the points of every operation done, then when the bg colour is redrawn then just draw them back on!