How to Make a Message Box in Notepad

261,537

26

80

Introduction: How to Make a Message Box in Notepad

About: I'm the left leg of the computer Ultimate but I have access to the web because there's a wire connecting me to the operating system. I'm currently making an unattended WinXP CD that looks and behaves like Vist…

Hi there. I'm going to teach you how to make a message box. All you need is Notepad. If you have any comments, feel free to post them. Just start learning and have fun!

Step 1: Step 1: Typing the Text

First, open Notepad and type this:

x=msgbox(box text,buttons,box title)

On the part where it says "box text", type the text you want on the window (with quotation marks). On the "box title", type the title of the message box the same way you typed the text. On "buttons" type a number (without quotation marks):

0: Normal message box
1: OK and Cancel
2: Abort, Retry, Ignore
3: Yes, No, Cancel
4: Yes and No
5: Retry and Cancel
16: Critical message icon
32: Warning query icon
48: Warning message icon
64: Information message icon
4096: Always stay on top of the desktop

Step 2: Step 2: Saving the File

When you're done, save it as a VBS(or VBScript)file. To do this, type ".vbs" at the end of the title and change the "Text Document (*txt)" in the "Save as type" select box to "All Files" .

Example: File name: Fake_Virus.vbs
Save as type: All Files

Step 3: The End

Congratulations! You've done it. To have fun, why don't you make a message box disguised as a "fake" trojan horse on your friend's computer, create a shorcut, rename it, change the icon, lure your friend to click it, and watch them freak out!
As I said, feel free to post any comments.

7 People Made This Project!

Recommendations

  • Toys & Games Contest

    Toys & Games Contest
  • Big vs Small Challenge

    Big vs Small Challenge
  • Fix It Challenge

    Fix It Challenge

80 Comments

0
SomeRandomCoder
SomeRandomCoder

Tip 5 weeks ago

x=msgbox("Your Text Here",numbers here,"Your Title Here")

0
muhammad.gha.faiz
muhammad.gha.faiz

Question 5 months ago on Step 1

how to make cancel button to useful? like when you get message box you cancel it and message box is disappeared

0
Booldt
Booldt

Question 5 months ago

How can you make it so the buttons say something custom, like instead of "ok" in the bottom it says "beans beans beans beans beans"

0
temoxyyt
temoxyyt

Question 8 months ago

How do you make it were when you click "Ok" (or any button) it will say another text?

1
WindowsTipper1992
WindowsTipper1992

Tip 2 years ago

if you want to loop it another way.do this.
:a
x=msgbox(box text,buttons,box title)
goto a

1
RajpootA
RajpootA

Reply 1 year ago

Actually, You can't!
We're talking about visual basic script here! The method you told works for batches only. Here, Try this in .vbs or .wsf files.

do
msgbox("message",0+16+4096,"title")
'wscript.sleep 1000
loop

Remove the apostrophe (') If you wanna add an interval in your loop, where 1000=1 sec
Hope that helped :)

0
Kabuem
Kabuem

2 years ago

I'm trying to batch-vbs , is there a way to like set errorlevels on each buttons clicked or how
does someone define a variable in vbs after a specific button event ?

0
mikemmcmeans
mikemmcmeans

11 years ago on Introduction

no no no this is how to make a msgbox in visual basic
not notepad

0
NebulaIX
NebulaIX

Reply 2 years ago

well it works in notepad

0
Qajs1
Qajs1

Reply 10 years ago on Introduction

Actually the way to make a MsgBox in Visual Studio is:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MsgBox("Computer Shutting down in 60 Minutes.")
End Sub

0
Caleb8
Caleb8

Tip 2 years ago on Step 1

Remember to put .vbs when you save it. not .txt

So the name needs to be: Whatever you want.vbs

You can name it anything, but make sure you have .vbs at the end. :)

0
100Y
100Y

2 years ago

how do i put text in the message boxes title

0
FisnikK1
FisnikK1

3 years ago on Step 1

Hello,

How to creat other buttons (not like Yes/No and OK)?

I mean "Hello or smth else"

thank you

0
Band458976
Band458976

Tip 3 years ago on Introduction

If you want a message box who can't be close (except using the task manager), do this:
Do
x=msgbox(box text,buttons,box title)
loop

0
millsasbc
millsasbc

10 years ago on Introduction

Hi could you please answer theese questions for me,
1. how do i make something happen when i click one of the buttons
2. how do i make the message box automatticaly open when i log on

thnaks could you please reply to this comment at millsasbc@gmail.com
thanks

0
The Real boolonut100R
The Real boolonut100R

Reply 3 years ago

1. you cant

2. go to task scheduler and create a basic task, you'll get it from there

0
AlexandraT34
AlexandraT34

Reply 3 years ago

Yes, you can, you just have to make another message box just like the last one on a second line. But the other will appear even if you select the "X" Button.

0
VictorS10
VictorS10

Reply 5 years ago on Introduction

Well I know how to make it run when you log on to windows.

Here's how:

Open Start Menu >> Drag application to startup folder >> Enjoy!

0
UmairY
UmairY

6 years ago on Introduction

How can i create a never endind dailog box and it will display when computer start