目录
前言
最近看360浏览器有个网址大全,
我馋的要死,
就自己做了一个,
盗版饼干网址大全,
c++编译器均能运行
功能
有点弱,只有输入网址的功能。。。
后期我会把功能补上
代码
#include<iostream>
#include<string>
#include<windows.h>
#include<conio.h>
using namespace std;
long long sd = 5;
bool f = 1;
//
void hy();
void zj();
void zy();
void srwz();
//
string str(string);
void gs(long long, long long, string);
void gb();
void ydgb(int, int);
//
int main()
{
system("mode con cols=100 lines=30");
system("color f0");
gb();
hy();
while (f)
{
system("cls");
zy();
}
system("cls");
zj();
return 0;
}
//
void hy()
{
gs(13, 45, "欢迎");
for (long long i = 1; i <= 3; i++)
{
system("color f1");
Sleep(sd);
system("color f2");
Sleep(sd);
system("color f3");
Sleep(sd);
system("color f4");
Sleep(sd);
system("color f5");
Sleep(sd);
system("color f6");
Sleep(sd);
system("color f7");
Sleep(sd);
system("color f8");
Sleep(sd);
system("color f9");
Sleep(sd);
system("color fa");
Sleep(sd);
system("color fb");
Sleep(sd);
system("color fc");
Sleep(sd);
system("color fd");
Sleep(sd);
system("color fe");
Sleep(sd);
}
system("color f0");
for (long long i = 1; i <= 3; i++)
{
system("color 0f");
Sleep(sd);
system("color 10");
Sleep(sd);
system("color 20");
Sleep(sd);
system("color 30");
Sleep(sd);
system("color 40");
Sleep(sd);
system("color 50");
Sleep(sd);
system("color 60");
Sleep(sd);
system("color 70");
Sleep(sd);
system("color 80");
Sleep(sd);
system("color 90");
Sleep(sd);
system("color a0");
Sleep(sd);
system("color b0");
Sleep(sd);
system("color c0");
Sleep(sd);
system("color d0");
Sleep(sd);
system("color e0");
Sleep(sd);
}
system("color f0");
return;
}
void zj()
{
gs(13, 45, "再见");
for (long long i = 1; i <= 1; i++)
{
system("color f1");
Sleep(sd);
system("color f2");
Sleep(sd);
system("color f3");
Sleep(sd);
system("color f4");
Sleep(sd);
system("color f5");
Sleep(sd);
system("color f6");
Sleep(sd);
system("color f7");
Sleep(sd);
system("color f8");
Sleep(sd);
system("color f9");
Sleep(sd);
system("color fa");
Sleep(sd);
system("color fb");
Sleep(sd);
system("color fc");
Sleep(sd);
system("color fd");
Sleep(sd);
system("color fe");
Sleep(sd);
}
system("color f0");
for (long long i = 1; i <= 1; i++)
{
system("color 0f");
Sleep(sd);
system("color 10");
Sleep(sd);
system("color 20");
Sleep(sd);
system("color 30");
Sleep(sd);
system("color 40");
Sleep(sd);
system("color 50");
Sleep(sd);
system("color 60");
Sleep(sd);
system("color 70");
Sleep(sd);
system("color 80");
Sleep(sd);
system("color 90");
Sleep(sd);
system("color a0");
Sleep(sd);
system("color b0");
Sleep(sd);
system("color c0");
Sleep(sd);
system("color d0");
Sleep(sd);
system("color e0");
Sleep(sd);
}
system("color f0");
return;
}
void zy()
{
char s;
while (1)
{
system("cls");
gs(8, 40, "饼干网址大全");
gs(3, 40, "空格输入网址");
gs(1, 40, "0.退出");
s = _getch();
while (s != ' ' && s != '0')s = _getch();
switch (s)
{
case ' ':
srwz();
break;
case '0':
f = 0;
return;
break;
}
}
return;
}
void srwz()
{
system("cls");
gs(9, 15, "-------------------------------------------------------------------");
gs(1, 15, "| |");
gs(1, 15, "-------------------------------------------------------------------");
ydgb(16, 10);
string n;
cin >> n;
n = str(n);
system(&n[0]);
return;
}
//
string str(string n)
{
n = "start " + n;
return n;
}
void gs(long long x, long long y, string str)
{
for (long long i = 1; i <= x; i++)
cout << "\n";
for (long long i = 1; i <= y; i++)
cout << " ";
cout << str;
return;
}
void gb()
{
CONSOLE_CURSOR_INFO cursor;
cursor.bVisible = FALSE;
cursor.dwSize = sizeof(cursor);
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorInfo(handle, &cursor);
return;
}
void ydgb(int x, int y)
{
COORD pos = { x,y };
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);// 获取标准输出设备句柄
SetConsoleCursorPosition(hOut, pos);//两个参数分别是指定哪个窗体,具体位置
}
//
请三连!!!