0% found this document useful (0 votes)
2 views

IS-125-Computer-Programming-II-Message-Box

The document provides an overview of the Message Box function in VB.NET, detailing its syntax and components such as text message, title bar, buttons, and icons. It describes various message box styles and their corresponding icons, including Information, Exclamation, Question, and Stop. Additionally, it includes an activity for designing a program that displays a message box based on username and password validation.

Uploaded by

gonvol40
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

IS-125-Computer-Programming-II-Message-Box

The document provides an overview of the Message Box function in VB.NET, detailing its syntax and components such as text message, title bar, buttons, and icons. It describes various message box styles and their corresponding icons, including Information, Exclamation, Question, and Stop. Additionally, it includes an activity for designing a program that displays a message box based on username and password validation.

Uploaded by

gonvol40
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Message Box

IS 125: COMPUTER PROGRAMMING II


INSTRUCTOR: GERALD EMERSON S. CORPIN, MPM
MESSAGE BOX
 Displays a pop-up message and prompts the user
to click on a command button

Syntax:
MsgBox(<Message>, <MessageBoxStyle, Icon>, <MessageBoxTitle>)
MESSAGE BOX (cont.)
The basic components of a message box are:
1. Text Message
2. Title Bar
2
3. Message Box Button
4. Icon 4 1

3
MESSAGE BOX ICONS

ICON NAME DESCRIPTION


Information Displays Information Icon
Exclamation Displays Exclamation or warning mark Icon
Question Displays Question Mark Icon
Stop Displays Critical Icon
MESSAGE BOX STYLES

ICON NAME DESCRIPTION


Information Displays Information Icon
MsgBox("This is a Message Box", MsgBoxStyle.Information)
MESSAGE BOX STYLES

ICON NAME DESCRIPTION


Exclamation Displays Exclamation or warning mark Icon
MsgBox("This is a Message Box", MsgBoxStyle.Exclamation)
MESSAGE BOX STYLES

ICON NAME DESCRIPTION


Question Displays Question Mark Icon
MsgBox("This is a Message Box", MsgBoxStyle.Question)
MESSAGE BOX STYLES

ICON NAME DESCRIPTION


Stop Displays Critical Icon
MsgBox("This is a Message Box", MsgBoxStyle.Critical)
MESSAGE BOX STYLES / RESPONSES

MsgBox("This is a Message Box", MsgBoxStyle.OkOnly)


MsgBox("This is a Message Box", MsgBoxStyle.OkCancel)

MsgBox("This is a Message Box", MsgBoxStyle.AbortRetryIgnore)

MsgBox("This is a Message Box", MsgBoxStyle.YesNo)

MsgBox("This is a Message Box", MsgBoxStyle.YesNoCancel)

MsgBox("This is a Message Box", MsgBoxStyle.RetryCancel)


Activity
Controls:
2 Labels (Labeled as Username, Password)
2 Textbox
1 button (Labeled as Submit)

Design your VB.NET program wherein if username and password is correct, a


message box (“OK” button only, use “Information” Icon) will be displayed:
“Username and Password matched”
Else
“Invalid Username and Password”

You might also like