Thread: Is it possible to create flashing text?

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    1

    Is it possible to create flashing text?

    Hi, I was hoping someone could answer this question for me. I got a program that I'm compiling under g++ on UNIX. Im trying to cout some text to the screen that flashes. Can anyone tell me if this is possible?

    Thanks for your help.

  2. #2
    I'm Back
    Join Date
    Dec 2001
    Posts
    556
    yes.

    the way i do it is [if you have conio.h and dos.h]

    Code:
    --
    --
    for(i=1;i<10;i++)
    {
     gotoxy(35,12);
     clreol();
     cout<<"HELLO WORLD";
     delay(200);
     gotoxy(35,12);
     clreol();
     cout<<"                       ";
     delay(100)
    }
    --
    --


    there is also a BLINK function in conio.h. i havent used it but you could search for it in your compiler help.
    -

  3. #3
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    here is one way to do it, and i may be wrong on the /r part of it but i think it is /r. /r returns you to the beginning of the line, IIRC.

    Code:
    for(int i; i < 5; i++)
     {
     cout << "text\r";
     Sleep(100); //waits one tenth of a second
     clrscr();
     }
    this will give you the effect of seeing flashing text five times.

    change as you wish

    then again i have no idea if this will work under the environment you are looking to use it under.

    EDIT: i was posting while ishir posted.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX | Drawing text
    By gavra in forum Game Programming
    Replies: 4
    Last Post: 06-08-2009, 12:23 AM
  2. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 02:59 PM
  3. Removing text between /* */ in a file
    By 0rion in forum C Programming
    Replies: 2
    Last Post: 04-05-2004, 08:54 AM
  4. Small HTML question
    By Thantos in forum Tech Board
    Replies: 4
    Last Post: 12-29-2003, 12:37 AM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 07:35 PM