Introduction: Make Easy VBScript - Dialog Boxes

About: I want to learn more more and more..! Its my Dream, Hobby, Passion and Obsession.

So friends Today you're gonna learn how to make easy Dialog Boxes in Windows easily in a single line of text.

Step 1: What Is a Dialog Box ?

VBScript

VBScript allows the developers to interact with the user effectively. It can be a message box to display a message to a user or an input box with which user can enter the values.

VBScript MsgBox Function
The MsgBox function displays a message box and waits for the user to click a button and then an action is performed based on the button clicked by the user.

Step 2: Syntax-(How to Make It)

First of all open Notepad

Write

x=msgbox("DETAILS YOU WANT TO ADD TO YOUR BOX",TYPE OF BOX,"TITLE")

So lets checks details on each,

-At first you have to write as it is until first " mark.

-Now write what you want to write inside the dialog box.

-The type of box you want to make. It actually contains numbers which determine the type of box you want to make.

-And at last is the title of your dialog box.

So to make a basic box write 6+16 between commas,

x=msgbox("DETAILS YOU WANT TO ADD TO YOUR BOX",6+16,"TITLE")

For a critical exclamation mark box write 16+32

x=msgbox("DETAILS YOU WANT TO ADD TO YOUR BOX",16+32,"TITLE")

For a help or question mark box write 16+16

x=msgbox("DETAILS YOU WANT TO ADD TO YOUR BOX",16+16,"TITLE")

After you are done save the file with a name and at the end write .vbs and choose all files.

EG : filename.vbs

Step 3: Example

You can also create several boxes in a row as in the example.

I have included everything in the example so don't forget to check that.

x=msgbox("If you see someone without a smile, give them one of yours.",6+16,"Quote 1")

x=msgbox("In the practice of tolerance, one's enemy is the best teacher.",16+16,"Quote 2")

x=msgbox("The best mirror is an old friend.",16+32,"Quote 3")

Save it as Quote.vbs

And there you go.