loading
In this instructable, you will learn how to create a message box with notepad on your computer.

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

Step 2: Editing Your Message Box

To choose the types of buttons or how you want your message box to look like change the number in between the commas.

x=msgbox ("Example Text" ,your number here, "Example Title")

Replace your number here with one of the following:

0 displays the OK button only
1 displays the OK and Cancel buttons
2 displays the Abort, Retry and Ignore buttons
3 displays the Yes, No, Cancel buttons
4 displays the Yes and No buttons
5 displays the Retry and Cancel buttons
16 displays the Critical Message icon
32 displays the Warning Query icon
48 displays the Warning Message icon
64 displays the Information Message icon
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)
to make more than one put this + in between the numbers

Step 3: Saving Your Message Box

Click File and Save As... and save it as yourfilename.vbs. Replace 'yourfilename' with the file name you want (for example instructables.vbs). The .vbs must be left at the end otherwise your message box wont work. Save it somewhere on your computer.

Step 4: Testing Your Message Box

Open up the file you saved.

There you have it! A message box created by you.

Step 5: Some Tips

If you want you can put more message boxes on your file.
for example:
x=msgbox ("Do you want to learn how to make this message box?" ,4, "Instructables")
x=msgbox ("If you said yes go to the Instructables website" ,0, "Instructables")
x=msgbox ("If you said no close the message box" ,0, "Instructables")

If you want your message box to be uncloseable (when you click a button or the close button the message box will keep on reappearing) type this:

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

The only way to stop this is to open up Windows Task Manager, go to the Processes tab and look for wscript.exe and click End Process.
Hey, this is a great instructable and is very informative. Just one thing is missing... pictures! It really helps a lot when trying to follow directions so you should consider taking some photographs. Once you do that and leave me a message when you have so that we can publish your work. Thanks! Thanks for the cool instructable and we hope to publish this soon!

About This Instructable

3,410views

1favorite

License:

More by alexman695:
Add instructable to: