{在左上角显示时间} procedure ThreadProc; var hScreenDC: hdc; SystemTime: _SYSTEMTIME; Temp: string; MyOutput: PChar; begin while true do begin Sleep(100); hScreenDC := GetDC(0); GetLocalTime(SystemTime); Temp := format('Current Time is %d-%d-%d %d:%d:%d', [SystemTime.wYear, SystemTime.wMonth, SystemTime.wDay, SystemTime.wHour, SystemTime.wMinute, SystemTime.wSecond]); MyOutPut := Pchar(temp); TextOut(hScreenDC, 0, 0, MyOutPut, lstrlen(MyOutPut)); ReleaseDC(0, hScreenDC); end; end;