Advertisement
Guest User

Mouse Prank

a guest
Apr 1st, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <windows.h>
  2. /* By K1u
  3. k0h.org
  4. Disclaimer: I am not responsible for any damages this program my create.
  5. I am not responsible for how you use this program.
  6. */
  7. int main(void){
  8. FreeConsole(); /* Hidden console */
  9. /* Get the screen sizes */
  10. int sw = GetSystemMetrics(SM_CXSCREEN);
  11. int sh = GetSystemMetrics(SM_CYSCREEN);
  12. for( ;; ){
  13. srand(GetTickCount()); /* Seed random generator */
  14. SetCursorPos((rand() % sw) + 1, (rand() % sh) + 1);
  15. /* SetCursorPos function moves the cursor to the specified screen coordinates
  16. How to stop - Hit Ctrl-Alt-Del together which will open the task manager then using
  17. the arrow keys scroll until program name found then hit the Delete key then enter. */
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement