$include "graph.inc" 'Colours and values for a graph.... GraphOutline = RGB(216,216,190) GraphFill = RGB(255,216,190) GraphAcross = 10 GraphDown = 50 GraphWidth = 225 GraphHeight = 10 WINDOW w1 int WindowBackColour = RGB(253,255,214) OPENWINDOW w1,0,0,490,150,@MINBOX|@MAXBOX|@SIZE|@CAPTION,0,"Window",&handler SETWINDOWCOLOR w1,WindowBackColour CreateGraph(w1,GraphOutline,WindowBackColour) 'Create an "empty" graph starttimer w1,GraphSpeed(1) ' Maximum time (Minutes) into 1 percent of graph for the timer speed interval WAITUNTIL IsWindowClosed(w1) end SUB handler(),INT SELECT @MESSAGE CASE @IDCREATE CENTERWINDOW w1 CASE @IDCLOSEWINDOW CLOSEWINDOW w1 case @IDTIMER if UpDateGraph(w1,GraphOutline,GraphFill) = 100 'Update the graph EraseGraph(w1,WindowBackColour,WindowBackColour) 'Optional, clear it off screen endif CASE @IDCONTROL SELECT @CONTROLID ENDSELECT ENDSELECT RETURN 0 ENDSUB