itaym02

itaym02

  • NA
  • 66
  • 0

using the same Graphics object in two treads

Oct 5 2004 5:09 PM
Greetings. I have two bitmaps (a ball and a man). I want them both to move on the screen, the man is handled in the main thread, The ball movment is handled by the secondary thread. I am using the same Graphics object for both bitmaps, since they are painted on the same window. Most of the time it works, but some time an Exception is thrown. The error is "Graphics object allready in use". I assume both threads tried to use the object simultaniusly. Is there a way to suspend a thread from another thread? Do any think of a better solution? Regards

Answers (1)