How to Make a Message Box in Notepad

Published

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 Vi...

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.

5 People Made This Project!

Recommendations

  • Casting Contest

    Casting Contest
  • Clocks Contest

    Clocks Contest
  • Woodworking Contest

    Woodworking Contest
user

We have a be nice policy.
Please be positive and constructive.

Tips

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

Questions

70 Comments

Hello,

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

I mean "Hello or smth else"

thank you

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

3 replies

1. you cant

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

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.

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!

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

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

1 reply

create basic task in app: Task Scheduler with trigger of logon and action of run ur script

and also put your msg box code over and over for a long chain of msg boxes

Save it as .vbs

I, m sorry, did'nt get the point. This is what I saved as what was thought:

x=msgbox(box "mailbox",0,"veldfiets"), saved as .vbs, all type of files, in Documents.

Nothing happens on opening the .vbs file: not able to open etc. etc.

What is the clue here?

6 replies

you have to save it as ".bat" that's why it did not work.

no you have to save it as .vbs

Wrong saving it as .bat is used in batch programming. Codes in batch is like @echo off

color 0a

title hello world

:start

echo Hello World

pause

vbscript would not run in batch so something is wrong with your method. Make sure your syntax is wright and save as whatyouwant.vbs but don't forget *.vbs. :)

Well, first there is an unknown tag: "bat" located in the parenthesis. If it is working properly, then this should at least pop up as an error, so I don't know why it is not working at all. This only runs on Windows (this could be it)

x=msgbox(box "mailbox",0,"veldfiets") is the wrong code. Try

x=msgbox("mailbox",0,"veldfiets")

Ok?