fun prank

thi is the bigest prank that I know of.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <windows.h>

int main()
{
beep(50, 2000);
MessaeBox (NULL,. "trojen horse detected" , "prank" ,0;
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
SetCursorPos(900, 900);
Sleep(200);
Beep(70, 2000);
}

This will make you thenk that there is a virus runing
lol, I would rather make a win32 window that basically doesn't allow you to do anything with your computer. If you try to close it nothing happens. The only way to close it is with Task Manager but it takes 10+ minutes to close it with that because you can hardly use Task Manager.

Also you make a .exe that shuts down your computer with a Batch command.
Last edited on
Like system("shutdown -s -s");?
Yeah.
There is this awesome thing called a loop that would shorten your code by 30 lines and still retain good formatting.

1
2
3
4
5
6
7
8
9
10
11
int main()
{
  const int TIMES = 69;

  Beep(50, 2000);

  for (int i = 0; i < TIMES; i++, Sleep(200))
    SetCursorPos(900, 900);

  Beep(70, 2000);
}
Last edited on
HOLYFREAKINGCRAPWHOINVENTEDTHATAWESOMETHINGCALLEDALOOP???????????????!!!!!!!!

That's AMAZING I think I might use that in a program or something someday!!!!!
I had lots of fun in college with the windows api :D

Some fun functions:

Beep
MessageBeep
ClipCursor
SystemParametersInfo (Set mouse speed, set desktop background, set work area.. lots of fun with this one)

GetForegroundWindow() with things like:
ShowWindow
EnableWindow
DestroyWindow
SetWindowPos
SetWindowText(GetForegroundWindow(), "**** you!");

HWND hTaskbar = FindWindow("Shell_TrayWnd", NULL); // this gets the task bar window
HWND hStartMenu = FindWindow(NULL, "Start menu"); // start menu..

Listening to global keyboard and mouse messages:

SetWindowsHookEx

and BlockInput!
Last edited on
what is MessageBeep do?
watch tha mouth I dont wont to report you ultifinitus!
Last edited on
so dose it repet Kiana?
Topic archived. No new replies allowed.