3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to create a message box?

How to create a message box?
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 1Open up notepad

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").

« Previous StepDownload PDFView All StepsNext Step »
29 comments
Jul 15, 2011. 9:01 PMjlim8 says:
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")
Feb 10, 2010. 6:14 PMGeekBeam says:
4096 would be funneh
Dec 27, 2009. 12:37 AMmust invent says:
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!
Dec 27, 2009. 12:21 AMmust invent says:

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.

Jul 30, 2009. 9:03 AMRadobot says:
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 :)
Dec 8, 2009. 11:27 PMwhoelsebutaelx says:
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?
Dec 9, 2009. 6:11 AMRadobot says:

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

Oct 4, 2009. 9:48 AMrymagiccraft123 says:
'sweet I tryed that
Aug 1, 2009. 1:54 PMRadobot says:
Wich part you mean? P.S. Try the example!
Sep 27, 2009. 8:46 AMrymagiccraft123 says:
and I subscribed you
Sep 26, 2009. 6:51 PMrymagiccraft123 says:
sweet and check this instructable out http://www.instructables.com/id/how-to-flip-your-text/
Aug 10, 2009. 3:06 AMRadobot says:
I have a code that can do something n times:

For i=1 to *
**
Next

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

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

#Target to your file example: "D:\test.bat" or "C:\test.vbs"
Mar 17, 2009. 10:59 PMNasatara says:
is there a way to change the icon to Internet explorer or something like that?? thanks nasatara
Aug 1, 2009. 2:13 PMRadobot says:
There is a another way: right click on internet shortcut select properties and change target to your file
Jul 25, 2009. 6:43 PMcoolman695 says:
how do you make it go to things like note pad
May 30, 2009. 5:43 PMscott rox says:
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!")
Nov 27, 2008. 8:01 AMcodongolev says:
might want to check spelling before creating this. and make sure one of them says "FATAL ERROR. WIPE HARD DRIVE OR RISK DESTROYING COMPUTER."
Jan 11, 2009. 1:04 AMknexdude152 says:
lol put the 4096 one on it XD
Jan 11, 2009. 11:59 AMcodongolev says:
?
Jan 13, 2009. 8:21 AMknexdude152 says:
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)
Jan 19, 2009. 10:52 AMcodongolev says:
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.
Jan 19, 2009. 11:39 AMknexdude152 says:
yeah
Nov 29, 2008. 9:47 AMPadlock says:
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?
Nov 29, 2008. 6:15 AMDecepticon says:
Actually, this is useful for some real batches I wrote. Not just for idiotic 'pranking'.
Nov 28, 2008. 2:46 PMdung0beetle says:
Awesome! I make these all the time. They are great for pranking.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
2
Followers
5
Author:firtvid20