Posted By

martinB on 02/06/09


Tagged

Net timer dotnet


Versions (?)

dotNet timer


 / Published in: Maxscript
 

The mycb function is called every milisceond, regardless of any other UI

  1. fn mycb = (
  2. ts = timeStamp() -- get current time
  3. thestring = ( (ts / 1000.0) as string + " sec")
  4. -- draw the time in the viewport
  5. gw.wText [50,50,0] thestring
  6. gw.enlargeUpdateRect #whole
  7. gw.updateScreen()
  8. )
  9.  
  10. -- create dotNet elements
  11. tmr = dotNetObject "System.Windows.Forms.Timer"
  12. tmr.interval = 1
  13. dotnet.addEventHandler tmr "tick" mycb
  14. tmr.start()
  15.  
  16. -- stop the timer
  17. -- tmr.stop()

Report this snippet  

You need to login to post a comment.