How to Make a Message Box in Windows

by Corgi2000 in Circuits > Computers

636 Views, 2 Favorites, 0 Comments

How to Make a Message Box in Windows

Birthday Cake.png

I learned how to do this a few years ago, and I thought I might show you. It takes only 5 minutes and is really fun to do.

Supplies

Here is what you will need:

-5 Minutes

-Windows XP or higher computer

-Notepad

Open Notepad

Capture.PNG

First, you will need to open Notepad. Tap the Windows Key and N.

Type the Code and Save

Capture3.PNG
Capture2.PNG

Here is what you will need to type into Notepad:

x=msgbox("Text Here","0","Title Here")

Once you've done that, hit save.

Select 'All Files' instead of 'Text Documents', and save it as 'MessageBox.vbs'.

Adding More Stuff

Blue Code.jpg

1. You can make your Message Box talk. Type this:

x=msgbox("Text Here","0","Title Here")

Set Sapi = Wscript.CreateObject("SAPI.SpVoice")

set wshshell = wscript.CreateObject("wscript.shell")

Sapi.speak "Enter What You Want Your Computer To Say Here"

2. You can make your Message Box have different buttons. Replace the "0" in the middle with one of these:

0: Normal message box

1: OK and Cancel

2: Abort, Retry, Ignore

3: Yes, No, Cancel

4: Yes and No

5: Retry and Cancel

3. You can also make it have different symbols:

16: Critical message icon

32: Warning query icon

48: Warning message icon

64: Information message icon

4. If you type 4096, it will always stay on top of the desktop.

When You've Finished...

Birthday Cake.png

You can show your friends how to make their own, make one to wish someone a Happy Birthday or Merry Christmas, or even a Fake Virus Message Box! If you are an Apple user, don't worry! You can make one by clicking the link below. Stay tuned for more awesome Instructables by Corgi2000!

http://atom.smasher.org/error/