C++ Pranks

Here are 2 source codes you can compile and run, harmless and fun and you can send them to your friends.

Requirements:
Dev C++ or Microsoft C++ express or any compiler

Change the Window Text (the text on the top left corner of a window):


Quote:
#include
using namespace std;

int main()
{
FreeConsole();

HWND Window;
Window = GetForegroundWindow();
SetWindowText(Window, "YOUR TEXT HERE");

SwapMouseButton(true);
Sleep(10000);
SwapMouseButton(false);

return 0;
}



This program first rename the foreground window text to what ever you want, then it swaps the mouse button for 10 seconds. finally it swaps the mouse buttons back and end the program.




Quote:
#include
int main()
{
FreeConsole();
while(1)
{
BlockInput(true);
}
}



This program simply disables the keyboard and mouse until the user restarts the computer.

0 comments:

Post a Comment