943,559 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 2514
  • C RSS
Aug 11th, 2004
0

Change the direction of a shape with a button

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Maineboy is offline Offline
3 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C Forum Timeline: Am not getting the right answers
Next Thread in C Forum Timeline: Commission or Brokerage Problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC