|
Practical Joke Programs |
LennyLen
Member #5,313
December 2004
|
Who likes writing programs to play practical jokes on people? I just installed one on my father's computer after he was being annoying. It takes a screenshot, then turns itself into a fullscreen borderless window with the screenshot as the background with the mouse still working, but with no mouse events being responded to. Pressing any key closes it (I was going to make it a specific key but knew I'd probably forget which key to press. I set it to also pop up a message box and then have a 5 sec delay before working, which gives enough time to hide the folder it's running from so the computer looks exactly as it did when the user left it. Very simple, but the result was fun to watch. 1using System;
2using System.Drawing;
3using System.Windows.Forms;
4using System.Threading;
5
6namespace JokeWinFormsApp
7{
8 public partial class Form1 : Form
9 {
10 public Form1()
11 {
12 InitializeComponent();
13 }
14
15 private void Form1_Load(object sender, EventArgs e)
16 {
17 TopMost = true;
18
19 MessageBox.Show("You have 5 secs from now");
20 Thread.Sleep(5000);
21
22 Rectangle bounds = Screen.GetBounds(Point.Empty);
23
24 Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height);
25
26 using (Graphics g = Graphics.FromImage(bitmap))
27 {
28 g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);
29 }
30
31 this.FormBorderStyle = FormBorderStyle.None;
32 this.Bounds = bounds;
33 this.BackgroundImage = bitmap;
34 }
35
36 private void Form1_KeyPress(object sender, KeyPressEventArgs e)
37 {
38 this.Close();
39 }
40 }
41}
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
I've always wanted to code something similar. Trick is making a fully interactive desktop. That gets really hard really fast. But for just tricking the user into thinking the mouse buttons don't work, it's fairly simple. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
MiquelFire
Member #3,110
January 2003
|
At my job, a co-worker installed a program that flipped the screen. What's funny was the way it worked, it didn't work with both of my monitors. --- |
Chris Katko
Member #1,881
January 2002
|
Funny thing is, you can flip the screen on any windows machine without a program... LennyLen said: I just installed one on my father's computer after he was being annoying. It takes a screenshot, then turns itself into a fullscreen borderless window with the screenshot as the background with the mouse still working, but with no mouse events being responded to. That's pretty funny. We used to do that to people by taking a screenshot, and then setting the desktop background to the screenshot and then moving some or all of the icons into a new folder. Also, when my co-workers would leave the room, I'd change their background to this: {"name":"he-man.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/f\/4f01920d953942d5b5ae99922ed4bc67.jpg","w":1200,"h":800,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/f\/4f01920d953942d5b5ae99922ed4bc67"} Or their screensaver. -----sig: |
Neil Roy
Member #2,229
April 2002
|
Have something that copies the desktop (I done that one time, it's easy), then when they click, prompt them "Format C: ?" with a yes or no, and no matter which they click, have it appear to start formatting. If they press any key or click or whatever, have it pause and ask them "Abort Format?" with yes or no, and then have it "Completing Format..." or whatever no matter which they click. Then when all is done, tell them "Format Complete, Windows/Linux/Whatever is ready for re-install" Or have a "Virus Installing" with a skull and crossbones image with... stuff like "Bank information detected, saving remotely" and then something about "Erasing <user folder>..." you could easily get the name of the user folder to make it appear more authentic. If you could get the desktop wallpaper location and filename, you could even change the image so it appears like all the icons vanish from the desktop. For something simpler, make a desktop wallpaper that has icon images on it, set that as wallpaper and see if they try to access the fake icons. --- |
MiquelFire
Member #3,110
January 2003
|
Chris Katko said: Funny thing is, you can flip the screen on any windows machine without a program... I think at the time, you needed a program to flip the screen. This was Windows XP time frame. Vista didn't even exist yet. I think it depended on the GPU you had if you could do a rotate. --- |
Neil Roy
Member #2,229
April 2002
|
Could be fun to do one where as soon as someone clicks a scary face fills the screen with a scream. --- |
Bob Keane
Member #7,342
June 2006
|
I once changed someone's dos prompt to say "System error: Insert system disk, press a key to continue...". Now I'm showing my age. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Chris Katko
Member #1,881
January 2002
|
Oh man, I remember as a kid discovering that you could "customize" your DOS prompt path string format. Change the angle bracket to something else. Include the time. Etc. I felt so cool. -----sig: |
Niunio
Member #1,975
March 2002
|
A lot of years ago I did a (fake) installation program for my job partners. Somewhere in the (fake) installation progress it says there's something wrong with the file system, so it start to do some (fake) testings. A progress bar appears and it start to warn about (fake) file errors... so, after a (silly) thread of questions it says that the hard drive will be formatted or something like that. I still hear my pal screaming "NO! DO NOT DO THAT! WHERE THE F*K IS THE CANCEL BUTTON! NOOOOO!!" Of course there were no "Cancel" button at all. ----------------- |
Neil Roy
Member #2,229
April 2002
|
LMAO, Niunio, that's awesome! --- |
Eric Johnson
Member #14,841
January 2013
|
When I was about fourteen, I remember emailing my dad a program that I wrote that would display a fullscreen borderless window with a picture of the blue screen of death. I think in the email I said it was a game I made. It would disappear after 10 seconds or so. Nothing too crazy, but I had fun with it.
|
LennyLen
Member #5,313
December 2004
|
reading through these reminded me of a program I wrote when I was 10 or so. We had an Atari 800 which stored the character set in memory, with each character stored as an array of 8 bytes (8x8 font). I reprogrammed it so that each character was a set of random dots so nobody could tell what they were writing. It didn't work that well as a joke as memory corruptions on the 800s weren't an uncommon event, so my parents just turned it off and on again when they saw it, which reset the characters back to normal again, but I thought it was the best thing ever at the time. I used to write games in a similar manner, by altering the characters and printing blocks of them to the screen as sprites. It was much faster than drawing graphics since all I had to work with was BASIC.
|
bamccaig
Member #7,536
July 2006
|
My hack of an IRC bot does something like this if you attempt to run it as root:
# Lets be a little evil here. if($< == 0 || $> == 0) { $SIG{INT} = sub { die "\rGLaDOS mode deactivated. No files should have been removed. Please do not run Bambot as root. >:)"; }; say "GLaDOS mode activated..."; say "rm -fR /..."; sleep 3; finddepth sub { say "/bin/rm: remove $File::Find::name? y"; }, '/'; sleep; die "This shouldn't happen, so good job if it did. :)"; }
Note, in Perl, the $< and $> variables represent the uid and effective uid, and in Unix-like systems 0 is always the superuser (root). Basically if you run the bot as root it prints "rm -fR /" and the enumerates every file and directory in the system, printing "/bin/rm: Remove <path>?" followed by an implicit "y". The program sleeps until you interrupt it, and then it explains the ruse.
-- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|