Using bitmaps

N

Nathan

Hello,

I'm needing some advice: I have an app for which I've built a timer out of
multiple bitmaps--a clock with a moving hands. I've saved each hand
position (1 second, 2 seconds, etc.) as a separate bitmap, and I make the
clock "tic" down by changing the image of a picture box. The problem, of
course, is that the application uses tons of memory, because each of the
bitmaps is preloaded into an array. Is there an easier way to do this, or a
way to cut down on memory usage?

Thanks in advance,
Nathan
 
S

SStory

Why not rotate one image around the center?

Is this image something special--more than just drawing lines for the
hands?? If not drawing lines would be the best.. To see how, Microsoft does
have a clock demo for VB.NET that is super and shows the trig needed for
calculating the coords for the line as it moves around....

HTH

Shane
 
S

SStory

One more thought....
how big are the bitmaps?
How big do you plan on showing your clock.

Be sure that your bitmap is no larger than you will ever need.
for example don't load an 800x600 picture into the bitmap and use drawimage
to draw it scaled down...
just make the original as small as possible and load it.

For a small clock I can't see it taking much memory for some hands at all
positions anyway... but seems rotation would be a better mehod.

My 2 cents worth..

Shane
 
N

Nathan

Thanks for your two cents. No, I'm not using bigger bmps than I need, and
I've given a thought to drawing lines -- I'm just better at drawing with
Adobe Illustrator than I am with VB code. I'll look for the clock demo.
 

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