GDI+ Challenge!!!

  • Thread starter Supramanian Murugesan
  • Start date
S

Supramanian Murugesan

Hi,

I have a challenging question in GDI+ graphics programming.

I have a Panel Control painted with some rectangles and lines. Also I have
some Label Controls inside the Panel Control.
The Label Control can be moved inside the Panel Control.

"But the Problem is when I move a Label Control using mouse the backgound
portion(painted area) of the moving-path become empty (or deleted by the
Label Control). Once I stop move the Label Control the background portion is
repainted."

Is is possible to keep the Painted Portion Stable/non-erasable? My
application looks really dirty bcoz of this problem.

Any answer for this question is highly rewarded.
Thanks in advance,

SPM.
 
J

Jeremy Cowles

Supramanian Murugesan said:
Hi,

I have a challenging question in GDI+ graphics programming.

I have a Panel Control painted with some rectangles and lines. Also I have
some Label Controls inside the Panel Control.
The Label Control can be moved inside the Panel Control.

"But the Problem is when I move a Label Control using mouse the backgound
portion(painted area) of the moving-path become empty (or deleted by the
Label Control). Once I stop move the Label Control the background portion is
repainted."

Is is possible to keep the Painted Portion Stable/non-erasable? My
application looks really dirty bcoz of this problem.

Sounds like homework. Is it? At any rate, you can fix this problem by
painting your background onto a Bitmap, then point your Panel.Background to
= the Bitmap.
Any answer for this question is highly rewarded.

Ok, what do I get for my reward?

HTH,
Jeremy
 
S

Supramanian Murugesan

Hi Jeremy,

You are smart enough to receive the reward. Hence my difficulty is, the
rectangles & lines I mentioned are not really static
items. They are Gantt Charts keep on changing based on the system parameter.
Atleast once in every 30 mins. If I do convert my painting portion into
bitmap image, the memory usage will become very high. Is n't it?

But, I am very much thankful to your reply.

SPM
 
J

Jeremy Cowles

Supramanian Murugesan said:
Hi Jeremy,

You are smart enough to receive the reward. Hence my difficulty is, the
rectangles & lines I mentioned are not really static
items. They are Gantt Charts keep on changing based on the system parameter.
Atleast once in every 30 mins. If I do convert my painting portion into
bitmap image, the memory usage will become very high. Is n't it?

Not if you .Dispose( ) the existing bitmap before you refresh it with a new
one. Now, where is my reward?!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top