option explicit ' new frame dim frame = new wxFrame(nothing, -1, "Digital Clock", wxPoint(250, 150), wxSize(330, 100)) ' create text dim txt = wxStaticText(frame, -1, "Clock", wxPoint(0, 0)) txt.SetFont(wxFont(48, wxMODERN, wxNORMAL, wxNORMAL)) ' show clock before time starts UpdateClock(nothing) ' create timer and set for 1000 miliseconds (1 second) dim Timer = wxTimer(frame) Timer.Start(1000) ' connect events connect(frame, -1, wxEVT_TIMER, "UpdateClock") connect(frame, wxEVT_CLOSE_WINDOW, "OnQuit") ' update clock sub UpdateClock(event) dim fulltime = time() txt.SetLabel(fulltime) end sub ' quit script function OnQuit (event) end end function ' show widow frame.Show(TRUE)