Just to be clear, I'm not suggesting that my example is a good way to code a solution. It just illustrates how UpdateNow would allow the first color to be seen onscreen before the second color overdraws it.

That wait loop is a total waste of CPU cycles...

Regards,
Joe Huber

Additionally you need to allow some time for your first color to register in your viewer's eye/brain before changing to the second color. Otherwise nothing will be perceived even though the first color showed for a brief period. Here's an updated method that shows how to do both...

  me.graphics.ForeColor = RGB( 20, 80, 160 ) // BLUE
  me.graphics.FillRect(0,0,me.graphics.width,me.graphics.height)

  Window.UpdateNow  //Flush the Blue rect to the screen

  Dim DoneTicks as integer = Ticks + 30
  While Ticks < Doneticks
   //Allow the blue rect to linger for half a second
  Wend

  me.graphics.ClearRect(0,0,me.graphics.width,me.graphics.height)
  me.graphics.ForeColor = RGB( 160, 80, 20 ) // ORANGE
  me.graphics.FillRect(0,0,me.graphics.width,me.graphics.height)


Hope this helps,
Joe
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to