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 4 1650
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
"Nathan" <nk*********************@softhome.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... 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
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
"Nathan" <nk*********************@softhome.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... 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
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.
"SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl... 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 "Nathan" <nk*********************@softhome.net> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... 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
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.
"SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl... 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 "Nathan" <nk*********************@softhome.net> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... 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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Brad Smalling |
last post by:
Does anyone know if there is a reason to prefer bitmaps over icons (or
vice-versa) when populating image lists? I've always favored icons because
of their built-in transparency (although I've...
|
by: Jeff Melvaine |
last post by:
I note that I can write expressions like "1 << 100" and the result is stored
as a long integer, which means it is stored as an integer of arbitrary
length. I may need to use a large number of...
|
by: Erwin |
last post by:
At the moment I'm using a report which contains an indicator to show
if a Service group of the company isn't working well or is working
perfectly. This indicator is a "*" which looks like a traffic...
|
by: Mark Evans |
last post by:
I have a dialog box and on it I want to display a bitmap, which will
change at various times during the program. My problem is that the
bitmaps will not be the same each time. I want the user to...
|
by: Macca |
last post by:
Hi,
I have been using MS paint to manipulate bitmaps by adding layers and points
to existing bitmaps. I need to know where in the bitmaps i have been adding
layers and points and paint tells me...
|
by: John |
last post by:
I have 76 bitmaps (640 x 480) and need to combine them together to form a big
one (about 3840 x 2880). Those 76 bitmaps overlap each other with a small
portion.
Is there any way to do it?
Thanks.
|
by: ..:: Kevin ::.. |
last post by:
If I load a PictureBox image from an embedded resource within my application
it works fine but if I load the same image from a file using OpenFileDialog
(as an ImageStream or using the file name)...
|
by: Dick |
last post by:
I have a shared project that contains icons and bitmaps that are used
throughout my suite of applications.
I have to set Form.Icon, PictureBox.Image, etc. using code because the form
designer...
|
by: nkumarin001 |
last post by:
Hi,
Can anyone help me in this matter:-
When i was studying locally managed tablespaces i came across bitmaps that are used in locally managed tablespaces it stated that:-
"Locally...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |