473,396 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Moving images

Hi,

what's the best way to move an image let's say from the top left to the
bottom right in e.g. half a second without flickering? I considered a timer
which modifies the position of an image but wonder if there are better ways.
Perhaps using a paintbox and draw methods instead or so.
Does anybody have other suggestions?

Thank you

Jan 7 '07 #1
6 10760
If your using GDI you'll neve get anything really smooth due to the way
windows invalidates. That was my experience anyway if anyone does know a way
to use GDI for a smooth animation i'd be interested to know myself. If
you're moving just a circle or some basic shape like that, that can be done
there are tutorials on the net. Personally i use Direct X

"Julius Fuchs" <ju**********@yahoo.dewrote in message
news:ew**************@TK2MSFTNGP03.phx.gbl...
Hi,

what's the best way to move an image let's say from the top left to the
bottom right in e.g. half a second without flickering? I considered a
timer which modifies the position of an image but wonder if there are
better ways. Perhaps using a paintbox and draw methods instead or so.
Does anybody have other suggestions?

Thank you

Jan 7 '07 #2
"Julius Fuchs" <ju**********@yahoo.deha scritto nel messaggio
news:ew**************@TK2MSFTNGP03.phx.gbl...
what's the best way to move an image let's say from the top left to the
bottom right in e.g. half a second without flickering? I considered a
timer which modifies the position of an image but wonder if there are
better ways. Perhaps using a paintbox and draw methods instead or so.
Does anybody have other suggestions?
You can use a double buffered panel.
You can find many infos on internet if you search for it.

Or you can try the canvas control that you can find in my little graphic
library at www.neodatatype.net
Jan 7 '07 #3
That also will not be totally smooth though, i also tried that myself. it
does help tho.
"Fabio" <zn*******@virgilio.itwrote in message
news:OQ**************@TK2MSFTNGP04.phx.gbl...
"Julius Fuchs" <ju**********@yahoo.deha scritto nel messaggio
news:ew**************@TK2MSFTNGP03.phx.gbl...
>what's the best way to move an image let's say from the top left to the
bottom right in e.g. half a second without flickering? I considered a
timer which modifies the position of an image but wonder if there are
better ways. Perhaps using a paintbox and draw methods instead or so.
Does anybody have other suggestions?

You can use a double buffered panel.
You can find many infos on internet if you search for it.

Or you can try the canvas control that you can find in my little graphic
library at www.neodatatype.net


Jan 8 '07 #4
"Daniel" <Da*****@vestryonline.comha scritto nel messaggio
That also will not be totally smooth though, i also tried that myself. it
does help tho.
In drawing I can reach a good smoothing level (not optimum for really fast
animations, of course).
If there is some tricks in the algorithm that move objects I can't say :)
Jan 8 '07 #5
Hi,

thank you all for your replies!

"Fabio" <zn*******@virgilio.itwrote in message
news:<OQ**************@TK2MSFTNGP04.phx.gbl>...
You can use a double buffered panel.
You can find many infos on internet if you search for it.

Or you can try the canvas control that you can find in my little graphic
library at www.neodatatype.net
Until now I didn't have the time to have a look at this thoroughly but it
looks promising.
To be a little more specific: I want to make a chess program with the pieces
"fly" over the board when they are moved. Other programs do that as well and
without flickering.
I just wonder if I should draw every piece manually or use images and change
their position. As I said, I didn't have the time to try both methods and
compare the results. What do you think might be best?

Thanks

Jan 8 '07 #6
Well i am biased, i always go for directx for any graphics as it gives th
ebest performance. However if you are not used to it, this will take you a
while to learn...tho managed direct x has made directx much easier now. For
me there are so many issues with gdi for good smooth aniamtions and you have
to do so much tweaking its just not worth it unless your graphics are very
simple.

"Julius Fuchs" <ju**********@yahoo.dewrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
Hi,

thank you all for your replies!

"Fabio" <zn*******@virgilio.itwrote in message
news:<OQ**************@TK2MSFTNGP04.phx.gbl>...
>You can use a double buffered panel.
You can find many infos on internet if you search for it.

Or you can try the canvas control that you can find in my little graphic
library at www.neodatatype.net

Until now I didn't have the time to have a look at this thoroughly but it
looks promising.
To be a little more specific: I want to make a chess program with the
pieces "fly" over the board when they are moved. Other programs do that as
well and without flickering.
I just wonder if I should draw every piece manually or use images and
change their position. As I said, I didn't have the time to try both
methods and compare the results. What do you think might be best?

Thanks

Jan 10 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: John | last post by:
I am currently using one of the IE hacks to give a PNG image full alpha transparency. But I wanted to move as much of this data to a .CSS as possible to lighten the load in the HTML as it is uses...
3
by: François de Dardel | last post by:
The URL is: http://mapage.noos.fr/dardelf3/tintin/ListeAutos.html The JS is in the header This page behaves as follows: Safari (Mac) OK MSIE (Mac) OK MSIE 5.0 (PC) OK (on Virtual PC on the...
10
by: Mark McLellan | last post by:
Dear all Following the oft-repeated advice here and ciwas I have made my site nearly 4.01 strict (working on it). There are some items on which I would appreciate your advice: 1. Hidden...
5
cassbiz
by: cassbiz | last post by:
I am trying to set an image with css and it is not moving in my css file I have the following line .po {position: absolute; top: 200px; right: 100px;} in my php page I have the...
1
by: Goutour | last post by:
Hello, I am a 2-day old Javascript developer :-) and I have a problem. I am trying to do examples I find on net about using onmouse events. I found a javascript that generates flying objects, and I...
1
pavlov
by: pavlov | last post by:
Hello everybody. I've this problem: I'm making a jpg moving horizontally from left to right in my page. I'd like to make it start moving from the left off-screen side. I tried using position...
10
by: cjparis | last post by:
Hello everyone. If anyone can give me a hand I would be gratefull Am doing a site which requires a moving element and have used DHTML to do it. Have a simple Browser detect script to sort IE...
4
anfetienne
by: anfetienne | last post by:
Hi, basically what i have got is a upload form that im linking to a flash gallery. The gallery uses two versions of an image....1 is for the thumbnail and the other the actual image. When i upload...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.