| | |
Change the direction of a shape with a button
![]() |
•
•
Join Date: Jul 2004
Posts: 3
Reputation:
Solved Threads: 0
I want to change the direction of movement of a shape (Circle) on a Form, using up,down,left,right, buttons placed within a panel also on the Form.
The form contains a shape(Circle) and a TTimer component.
I can get the Circle to move across the Form using :
Circle->Left = Circle->Left + 20; for the OnTimer event, but I now want to change the direction of the Circle using the buttons.
I know I will have to enter similar code in each of the ButtonClick events and I have the feeling that additional code will be required in the OnTimer event handler, but I can't work out what it is.
Please reply to my email with any help.
Regards,
Maineboy.
The form contains a shape(Circle) and a TTimer component.
I can get the Circle to move across the Form using :
Circle->Left = Circle->Left + 20; for the OnTimer event, but I now want to change the direction of the Circle using the buttons.
I know I will have to enter similar code in each of the ButtonClick events and I have the feeling that additional code will be required in the OnTimer event handler, but I can't work out what it is.
Please reply to my email with any help.
Regards,
Maineboy.
![]() |
Similar Threads
- How to call other class file with button in java applet?? (Java)
- A Polygon shape for a button (Pascal and Delphi)
- Is It possible to change the original caption of the button permanently ? (Visual Basic 4 / 5 / 6)
- Change the background of "active" button (JavaScript / DHTML / AJAX)
- Desert Island problem in Java3D (Java)
- is it possible to change the button design ? (Java)
Other Threads in the C Forum
- Previous Thread: Am not getting the right answers
- Next Thread: Commission or Brokerage Problem
| Thread Tools | Search this Thread |
#include adobe ansi api array asterisks binarysearch changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory dynamic execv feet fgets file fork forloop frequency function getlasterror givemetehcodez global grade graphics gtkgcurlcompiling hacking hardware highest histogram i/o include incrementoperators infiniteloop input interest kernel keyboard kilometer license linked linkedlist linux linuxsegmentationfault list locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft motherboard mqqueue mysql number odf opensource owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing scanf segmentationfault sequential shape socket socketprograming standard string systemcall threads turboc unix user voidmain() wab windows.h windowsapi




