鼠标乱飞
2025-08-05 14:06:41
发布于:广东
不建议整人,也禁止整人。
普通版
#include<windows.h>
#include<ctime>
using namespace std;
int main()
{
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
int n=100000;
srand(time(0));
while(n!=0){
SetCursorPos(rand()%x,rand()%y);
n-=1;
}
return 0;
}
加长版
#include<windows.h>
#include<ctime>
using namespace std;
int main()
{
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
int n=1000000;
srand(time(0));
while(n!=0){
SetCursorPos(rand()%x,rand()%y);
n-=1;
}
return 0;
}
超长版
#include<windows.h>
#include<ctime>
using namespace std;
int main()
{
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
int n=10000000;
srand(time(0));
while(n!=0){
SetCursorPos(rand()%x,rand()%y);
n-=1;
}
return 0;
}
无限版
建议别试
#include<windows.h>
#include<ctime>
using namespace std;
int main()
{
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
srand(time(0));
while(1){
SetCursorPos(rand()%x,rand()%y);
}
return 0;
}
全部评论 4
其实可以再加些代码,做一个小病毒,但是还是不要发出去,建议自己在家自己整自己
2025-08-05 来自 陕西
1Alt+F4能关掉
2025-08-05 来自 浙江
1这是个问题
2025-08-05 来自 广东
2
#include<windows.h> #include<stdio.h> #include<stdlib.h> #include<iostream> #include<ctime> using namespace std; int main(int argc,char *argv[]) { int n=1000; ShowWindow(FindWindow("ConsoleWindowClass",argv[0]),0); while(n--){ system("start cmd.exe"); SetCursorPos(6000,6000); } }
这个谁敢试
2025-08-06 来自 浙江
0666
2025-08-05 来自 广东
0
有帮助,赞一个