Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program of delayed text animation

Posted By: Easy Tutor     Category: C Programming     Views: 3083

Write a Program of delayed text animation.

Code for Program of delayed text animation in C Programming

#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<string.h>
#define pixTOrc(x) (8*(x-1))  //convert pixel into row and col format//Displays Graphic text in delaying fashionvoid displayMe(int x,int y,constchar *ch,int delayTime){
   char d[2];
   int len=strlen(ch);
   for(int i=0;i<=len;i++)
    {
     d[0]=ch[i];
     d[1]='\0';
     outtextxy(x+pixTOrc((i+1)*2),y,d);
     delay(delayTime);
    }
}




//At Exit the end function will call...void end(){
    int i,j;
    settextstyle(SMALL_FONT,HORIZ_DIR,7);
    displayMe(pixTOrc(5),pixTOrc(18),"www.syntax-example.com",250);
    displayMe(pixTOrc(5.25),pixTOrc(18),"www.syntax-example.com",80);
    setcolor(LIGHTGREEN);
    displayMe(pixTOrc(5),pixTOrc(23),"www.syntax-example.com",250);
    displayMe(pixTOrc(5.25),pixTOrc(23),"www.syntax-example.com",80);
    setcolor(LIGHTCYAN);
    displayMe(pixTOrc(5),pixTOrc(28),"www.syntax-example.com",250);
    displayMe(pixTOrc(5.25),pixTOrc(28),"www.syntax-example.com",80);
    setcolor(LIGHTMAGENTA);
    outtextxy(pixTOrc(5),pixTOrc(45),"Your Suggestion and comments are always welcome");
    delay(2000);
}


void main()
{
    int i,j;

    int gd=DETECT,gm=0;
    initgraph(&gd,&gm,"");

////Code as space holder\\\\\\
    setfillstyle(SOLID_FILL,BLACK);
    bar(0,0,640,480);
    settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
    setcolor(BLUE);
    outtextxy(pixTOrc(8),pixTOrc(2),"      Text Animation");
    setfillstyle(LINE_FILL,DARKGRAY);
    for(i=15,j=70;i<40||j>40;i++,j--){
        bar(pixTOrc(8),pixTOrc(7),pixTOrc(i),pixTOrc(7.5));
        delay(10);
        bar(pixTOrc(j),pixTOrc(7),pixTOrc(70),pixTOrc(7.5));
        delay(20);
    }
    setcolor(YELLOW);
////Code as space holder\\\\\\//calling of Text animation
    end();

    closegraph();
}
  
Share: 


Didn't find what you were looking for? Find more on Program of delayed text animation Or get search suggestion and latest updates.

Easy Tutor
Easy Tutor author of Program of delayed text animation is from United States. Easy Tutor says

Hello Friends,

I am Free Lance Tutor, who helped student in completing their homework.

I have 4 Years of hands on experience on helping student in completing their homework. I also guide them in doing their final year projects.

I have share many programs on this website for everyone to use freely, if you need further assistance, than please contact me on easytutor.2ya [at the rate] gmail [dot] com

I have special discount scheme for providing tutor services. I am providing tutor service to students from various contries, currently most of my students are from United States, India, Australia, Pakistan, Germany, UK and Canada.

I am also here to expand my technical network to receive more opportunity in my career, make friends to help them in resolving their technical problem, learn and share my knowledge, If you like to be my friend, Please send me friend request.

Thanks,
Happy Programming :)

 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!