Digital Clock With current time & Date – simple clock program, in c banane ke liye aapko C Programming , & “c gui application” Aani Chahiye And ,GUI Programming C language ,Se ham accha gui application create kar sakte hai|
Digital Clock With current time & Date
Contents
Simple Clock Program in C
Dosto Ham Me Aaj Digital Clock with current time and date ka program Banane Wale Hai. With An Example And With Understanding Or Isme Ham Kuch C ke function par focus karenge |
C Gui Application
Pahle Ham ek ek Function ko Samanj te and fir full digital clock banante hai . Friends Samanj Na Bahut jaruri hai agar aap c programming learn karna chahte hoto . Let See ..
http://masterprograming.com/c-programming/
Digital Clock Program With Current time and Date
Example :
#include<stdio.h> // Use Input Output
#include<conio.h> // Use Hold Screen
#include<time.h> // use For Time
#include<graphics.h> // use for graphics
void main ()
{
int graphdriver=DETECT, graphmode,i; // variable
time_t rawTime; // variable
char a[100]; // string variable
struct tm * currentTime; // Structure pointer variable
initgraph(&graphdriver,&graphmode,"c:\\tc\\bgi");
while(1) // infinite loop
{
// design rectangle for display
rectangle(1,1,639,444);
rectangle(2,2,638,110);
rectangle(2,111,638,222);
rectangle(2,222,638,333);
rectangle(2,333,638,444);
rectangle(450,0,638,110);
settextstyle(1,0,7); // text style
outtextxy(15,10,"Watch Time"); // display text
settextstyle(1,0,7); // text style
outtextxy(15,350,"Welcome To Friends"); // Display text
rawTime = time(NULL); // set null time
currentTime = localtime(&rawTime); // set pc local time
// print time I FOR HOUR & M FOR MINTUNE & S FOR SECOND
strftime(a,100,"%I:%M:%S",currentTime);
setcolor(5); // set time color
settextstyle(1,0,10); // set text style
outtextxy(40,80,a); // display time
// print Am And Pm
setcolor(15);
settextstyle(3,0,12);
strftime(a,100,"%p",currentTime); // P for Am & Pm
outtextxy(470,-29,a); // print AM & Pm
// print date
setcolor(15);
settextxy(1,0,7);
strftime(a,100,"Date :- %d\\%m\\%y",currentTIme); // d for date & m for month & y for year
outtextxy(40,230,a); // print date
delay(1000); // delay means wait 1000 ms
cleardevice(); // use clear data
}
getch(); // Use for hold Screen
closegraph(); // graph close
}
Dosto Hamne Abhi Tak Coding ko write kiya hai . dosto ham iska ab output check karte hai . wese mujhe to ye umeed hai ki aapko ye jo coding puri tarah se samanj gye honge kyoki mene sab kuch bare me comment line me write kiya hai |
Gui Programming C language
Output
C gui Application
Ab Ham Iske Kuch Topic Ko Understand karte hai . jese ki aap ye image dekh rhe honge to usme kuch line hai . Jese ki rectangle me aapko batata hu rectangle line ko bani hai wo kese bani hai.
design rectangle for display
rectangle(1,1,639,444);
Create C Gui Application
Rectangle Se Aapne Display ko Design kar sakte hai |
Example:
C gui Application
Dosto mujhe ummed hai ki aap Digital Clock with Date & Time ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |
1 thought on “Digital Clock With current time & Date | Create C Gui Application”