C++ string color with blink
Page 1 of 1
C++ string color with blink
#include
#include
using namespace std;
void gotoxy (int x, int y);
int main()
{
HANDLE hConsole;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, 2); // 2 means color Green. You can set your color code on your own likings.
while (true)
{
gotoxy(0,0);
cout<< "Jovie Jr. R Ticar (BSIT 1)";
Sleep(1000);
gotoxy(0,0);
system("cls");
Sleep(500);
}
cin.get(); // wait
return 0;
}
void gotoxy (int x, int y)
{
COORD coord;
coord.X = x; coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
#include
using namespace std;
void gotoxy (int x, int y);
int main()
{
HANDLE hConsole;
hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, 2); // 2 means color Green. You can set your color code on your own likings.
while (true)
{
gotoxy(0,0);
cout<< "Jovie Jr. R Ticar (BSIT 1)";
Sleep(1000);
gotoxy(0,0);
system("cls");
Sleep(500);
}
cin.get(); // wait
return 0;
}
void gotoxy (int x, int y)
{
COORD coord;
coord.X = x; coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
princeterror- Universal Moderator
- Posts : 272
Credits : 11465
Fame : 81
Join date : 2012-06-07
Age : 33
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum