Link to home
Start Free TrialLog in
Avatar of shirin
shirin

asked on

URGENT: Why the content of painbox get losted ?

Hi,
I draw something on paintbox but if i go to another form and come back to that form again drawed paint was get losted?
Why? How can i avoid from this problem?

Regards
Avatar of Russell Libby
Russell Libby
Flag of United States of America image

The paintbox is not a static canvas, thus you need to perform your actions in the Paint procedure of the TPaintBox contol. Btw, if you are painting something static, you might try drawing on a bitmap, and then assigning the bitmap to a TImage control instead.

Regards,
Russell

Avatar of shirin
shirin

ASKER

I dont want to static this Figure.
I only Need My program Change this figure.
with  overlapping another form with  paintbox form
previous Painted figure was get losted.

Avatar of shirin

ASKER

OK,
with Your Guidance I found:TImage is Better For my purpose.

But i can not clear previous paint when i click a button.

I added Extra points for my last  Q.



ASKER CERTIFIED SOLUTION
Avatar of Russell Libby
Russell Libby
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shirin

ASKER

Hi, How can I clear a Previous pain and paint a new one dynamically.
Avatar of shirin

ASKER

Ok,
I can it with
image1.picture.bitmap:=nil;
and draw another figure.