How to create a message box? by firtvid20
Instructables Mesaage Box.jpg
In this instructable, you will learn how to create a message box with notepad on your computer. Below is an example of a message box.
 
Remove these adsRemove these ads by Signing Up

Step 1: Open up notepad

Open up notepad on your computer. Type in the following:

x=msgbox ("yourtexthere" ,0, "yourtitlehere")

Replace 'yourtexthere' with the words you want in your message box and replace 'yourtitlehere' with the title you want on your message box (for example x=msgbox ("Do you want to learn how to make this message box?" ,4, "Instructables").

jlim8 says: Jul 15, 2011. 9:01 PM
I TRYED ITS SO COOL I PRANKED MY MOM WHILE DOING THIS HERE IS AN EX:


x=msgbox("You Have A Virus",0,"Virus")

Theres also another way follow ok


lol=msgbox("Message",0,"Title")
GeekBeam says: Feb 10, 2010. 6:14 PM
4096 would be funneh
alltootechnical says: Dec 27, 2009. 12:37 AM
I tried 'x=msgbox ("All of your stuff toys have died due to underfeeding",4096,"Alert!")'. When I opened Internet Explorer, it is still showing it!
alltootechnical says: Dec 27, 2009. 12:21 AM

Oh, I get the 'system modal', example of it is like in Microsoft Office that you want to exit with unsave document and I tried to click some parts of the screen and it keeps beeping.

Radobot says: Jul 30, 2009. 9:03 AM
Nice!
But I know how to make it more advanced(who can work with visual basic is in advantage):
First put on to the first line first (main) msessage box (that will decide what will happend next)
Then put this:

If x=vb* Then
x=messagebox("Second message box",any,"any")
End if

*Here you can put the name of the button that user was pressed (first letter must by big example: vbNo or vbIgnore...)

Here I create a cool example:

x=msgbox("Delete local disc D?",36,"Disc cleaner")
If x=vbNo Then
x=msgbox("Really no?",36,"Adjusting")
If x=vbNo then
x=msgbox("But you can't stop it.",64,"Status")
End if
End if
x=msgbox("Cleaning is starting.",64,"Disc cleaner")

And how it work's:
On start you have a "main" message saying: Delete local disc D?
On second line computer is checking what you was press and if it was No you see next message with question: Really no?
Then computer is again checking what you was press and if it was No you see message saing: But you can't stop it. and computer is going to last line
If it wasn't No then computer jump on the last line where is next message box saing: Cleaning is starting.
P.S. I think you can use this comment like next step :)
whoelsebutaelx says: Dec 8, 2009. 11:27 PM
How do you make it so that if you select yes for example it will do one thing but then if you press no it will do another thing?
Radobot says: Dec 9, 2009. 6:11 AM

Type this:

If x = vbNo Then

*User press No

Else

***User doesn't press No - user press Yes or Ignore or OK or ...
End If

And if you want to react on more buttons (like when user can press Retry or Ignore or Abort) try this:

If x = vbRetry Then
*Retry
ElseIf x = vbIgnore Then
*Ignore
ElseIf x = vbAbort Then
*Abort
Else
*Not Retry, not Ignore, not Abort - something else
End if

rymagiccraft123 says: Oct 4, 2009. 9:48 AM
'sweet I tryed that
firtvid20 (author) says: Jul 31, 2009. 6:25 PM
What do you mean? Can you show me??
Radobot says: Aug 1, 2009. 1:54 PM
Wich part you mean? P.S. Try the example!
rymagiccraft123 says: Oct 11, 2009. 4:55 PM
rymagiccraft123 says: Sep 27, 2009. 8:46 AM
and I subscribed you
rymagiccraft123 says: Sep 26, 2009. 6:51 PM
sweet and check this instructable out http://www.instructables.com/id/how-to-flip-your-text/
Radobot says: Aug 10, 2009. 3:06 AM
I have a code that can do something n times:

For i=1 to *
**
Next

*number of times
**thing to do * times
imshanedulong says: May 6, 2009. 11:08 AM
How do you get it to open a program after?
Radobot says: Aug 6, 2009. 1:01 PM
Yes,
here's the code:

set x=createobject("wscript.shell")
x.run "#"

#Target to your file example: "D:\test.bat" or "C:\test.vbs"
Nasatara says: Mar 17, 2009. 10:59 PM
is there a way to change the icon to Internet explorer or something like that?? thanks nasatara
Radobot says: Aug 1, 2009. 2:13 PM
There is a another way: right click on internet shortcut select properties and change target to your file
coolman695 says: Jul 25, 2009. 6:43 PM
how do you make it go to things like note pad
scott rox says: May 30, 2009. 5:43 PM
This one is so cool, make a shortcut on the desktop and change the name and picture to the Internet explorer one. Its cool cause the victim thinks the problem is with the internet:

x=msgbox ("Warning, Windows has found a virus. Do you want to remove it?" ,4, "WARNING!")
x=msgbox ("Windows could not remove virus. Searching for another antivirus software." ,0, "WARNING!")
x=msgbox ("Windows has removed the virus. Virus deleted program 'Microsoft Word' before it was removed." ,0, "WARNING!")
codongolev says: Nov 27, 2008. 8:01 AM
might want to check spelling before creating this. and make sure one of them says "FATAL ERROR. WIPE HARD DRIVE OR RISK DESTROYING COMPUTER."
knexdude152 says: Jan 11, 2009. 1:04 AM
lol put the 4096 one on it XD
codongolev says: Jan 11, 2009. 11:59 AM
?
knexdude152 says: Jan 13, 2009. 8:21 AM
4096 is a system modal; all applications are suspended until the user responds to the message box (in other words, this message box stays on top of all applications)
codongolev says: Jan 19, 2009. 10:52 AM
so, like, they can't just x out.

and it does the little *bum* noise and flashes when you try to go to another window.
knexdude152 says: Jan 19, 2009. 11:39 AM
yeah
Padlock says: Nov 29, 2008. 9:47 AM
This is all great and stuff, but there is no instructions on how to interface it. Is it really useful if "Do you want to open notepad?" pops up, but clicking the buttons does nothing?
Decepticon says: Nov 29, 2008. 6:15 AM
Actually, this is useful for some real batches I wrote. Not just for idiotic 'pranking'.
dung0beetle says: Nov 28, 2008. 2:46 PM
Awesome! I make these all the time. They are great for pranking.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!