adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Program in C to create process bar using Graphics

Program in C to create process bar using Graphics



First Program
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
 void main()
  {
  int gdriver = DETECT,gmode;
  int i;
  initgraph(&gdriver,&gmode,"C:\\TC\\BGI");
  outtextxy(140,80,"Please wait .");
 for(i=100;i<500;i++)
   {
    line(i,100,i,130);
    delay(100);
   }
   getch();
   closegraph();
  }
Output






Second Program

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
 void main()
  {
  int gdriver = DETECT,gmode;
  int i;
  initgraph(&gdriver,&gmode,"C:\\TC\\BGI");
  outtextxy(140,80,"Please wait .");
 for(i=100;i<500;i++)
   {
    line(i,100,i,130);
    rectangle(100,100,500,130);
    delay(100);
   }
   getch();
   closegraph();
  }

Output







Third Program


#include<stdio.h>
#include<conio.h>
#include<graphics.h>
 void main()
  {
  int gdriver = DETECT,gmode;
  int i;
  initgraph(&gdriver,&gmode,"C:\\TC\\BGI");
  outtextxy(140,80,"Loading please wait....");
 for(i=100;i<500;i+=5)
   {
    rectangle(i,102,i+5,128);
    rectangle(100,100,500,130);
    delay(200);
   }
 getch();
 closegraph();
  }

Output:-




Post a Comment

0 Comments