//************************************** // Name: COOL CLOCK // Description:COOL CLOCK is a program that takes the system time and date and then converts it to a string. It’s then displayed in graphical mode. // By: Napolean555 // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //This code is copyrighted and has limited warranties. //Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.10629/lngWId.3/qx/vb/scripts/ShowCode.htm //for details. //************************************** /* This program takes the system time and date and converts it to string. Then it's displayed in graphical Mode. */ #include #include #include #include #include void main() { int gdriver = DETECT, gmode, errorcode; time_t T; initgraph(&gdriver, &gmode, ""); errorcode = graphresult(); if (errorcode != grOk) { cprintf("GRAPHICS ERROR"); getch(); exit(1); } setcolor(WHITE); rectangle(86,106,524,135); rectangle(84,104,526,137); while(!kbhit()) { time(&T); setfillstyle(SOLID_FILL,BLACK); bar(87,107,523,134); setcolor(GREEN); settextstyle(1,0,4); outtextxy(90,100,ctime(&T)); delay(1000); } getch(); closegraph(); }