Source Code C++ untuk tulisan animasi berjalan

Source Code C++ untuk tulisan animasi berjalan

#include <iostream>
#include<conio.h>  // File Header untuk getch();
#include<windows.h>
using namespace std;
// Animasi
void gotoxy(int, int);
void Delay(void);
void gotoxy(int x, int y) {
HANDLE hConsoleOutput;
COORD dwCursorPosition;
dwCursorPosition.X = x;
dwCursorPosition.Y = y;
hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hConsoleOutput,dwCursorPosition);
}
void Delay(void) {
int i = 0;
while(i < 100000000) {
++i;
}
}
// Script Akhir Animasi
int main()
{
// Script Animasi
int x = 0, y = 0, max = 40, end = 79;
while(x <= max && !GetAsyncKeyState(VK_ESCAPE)) {
system(“CLS”);
system(“color A”);
gotoxy(x,y);
cout<<“SELAMAT DATANG,     Proses Loading Program,,,”<<endl;
//        cout<<“TUNGGU SEBENTAR YA”<endl;
Delay();
++x;
/* if(x == end) {
gotoxy(x,y);
printf(“SELAMAT DATANG DI APLIKASI SAYA”);
Delay();
x=0;
}*/
}
// Akhir Script Animasi
system(“pause”);
return 0;
}

Komentar

Postingan Populer