#include <iostream> #include<windows.h> #include <shellapi.h> #include <stdio.h> using namespace std; void FullScreen(){ HWND hwnd=GetForegroundWindow(); int x=GetSystemMetrics(SM_CXSCREEN)+300,y=GetSystemMetrics(SM_CYSCREEN)+300; char setting[30]; sprintf(setting,"mode con:cols=%d lines=%d",x,y);//设置控制台行数列数 system(setting); SetWindowPos(hwnd, HWND_TOPMOST,0,0,x+300,y+300,NULL);//置顶 MoveWindow(hwnd,-10,-40,x+300,y+300,1);//移动 printf("\n\n"); } int main() { char b; FullScreen();//调用子函数 char aj[]=" 卡电脑程序 "; char ak[]=" (专业版) "; char al[]=" "; char am[]=" 爨 爨 爨 "; char an[]=" 爨爨爨爨爨 爨爨爨爨爨 爨爨爨爨爨 "; char ao[]=" 爨爨爨爨爨爨爨爨爨爨爨爨爨爨爨 爨爨爨爨爨爨爨爨爨爨爨爨爨爨爨 爨爨爨爨爨爨爨爨爨爨爨爨爨爨爨 "; char ap[]=" 爨爨 爨爨 爨爨 "; char aq[]=" 爨 爨 爨 爨 爨 爨 "; char ar[]=" 爨 爨 爨 爨 爨 爨 "; char as[]=" 爨 爨 爨 爨 爨 爨 "; char at[]=" 请按任意键开始卡机 "; char au[]=" "; char av[]=" "; char aw[]=" "; cout<<endl<<endl<<endl<<endl<<aj<<endl<<ak<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<am<<endl<<am<<endl<<am<<endl<<an<<endl<<am<<endl<<am<<endl<<am<<endl<<ao<<endl<<ap<<endl<<aq<<endl<<ar<<endl<<as<<endl<<am<<endl<<am<<endl<<am<<endl<<am<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<at; system("color f5");//改变程序颜色 getchar(); system("cls"); system("color 3a");//改变程序颜色 for(;;b++)//无限循环 { ShellExecute(NULL, "open","卡电脑(测试).exe",NULL,NULL, SW_HIDE );//反复打开自己 ,中间是程序的文件名 cout<<b; } return 0; }
时间: 2024-08-04 18:45:31