0% found this document useful (0 votes)
77 views11 pages

VB6 Dialog Boxes: MessageBox & InputBox

This document discusses two types of dialog boxes in VB6: MessageBox and InputBox. MessageBox displays a message and waits for the user to click a button, returning an integer for the button clicked. InputBox displays a prompt and waits for the user to input text or click a button, returning the text as a string. Both accept parameters for the prompt, title, and default text or button options. The document provides details on the syntax and numeric codes for the different buttons and icons that can be used in MessageBox.

Uploaded by

Saroj patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views11 pages

VB6 Dialog Boxes: MessageBox & InputBox

This document discusses two types of dialog boxes in VB6: MessageBox and InputBox. MessageBox displays a message and waits for the user to click a button, returning an integer for the button clicked. InputBox displays a prompt and waits for the user to input text or click a button, returning the text as a string. Both accept parameters for the prompt, title, and default text or button options. The document provides details on the syntax and numeric codes for the different buttons and icons that can be used in MessageBox.

Uploaded by

Saroj patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Represent By

Saroj patel
Abhinash panigrahi
Kishan sabat
Type of dialog box

 There are basically two type of dialog box in vb6.0


 MessageBox
 InputBox
MessageBox
 MessageBox simply display a message in a dialog box
and wait for the user to click a button and return an
integer indicating which button the user clicked.

 Syntax:
 MsgBox(prompt[,button+icon] [,title])
MessageBox continue……..
 Prompt :
 prompt is a single line of message(string
expression) if we want to more than one line then
we can use vbCrlf or chr(13).

 Buttons+Icon:
Specify Sum of the numeric value to display type of
button and icon
MessageBox continue…….

 Title :

 Title is just a string expression display in title [Link] we


don’t add any title then by default the application
name is placed in title bar.
Messagebox continue……
 Icons:

vbCritical 16 display critical message icon


vbQuestion 32 display warning query icon
vbExclamation 48 display warning message icon
VbInformation 64 display information icon
MessageBox continue…….
 Buttons:

 vbOkOnly 0 display ok button only (by default)


 vbOkCancel 1 display ok and cancel button
 vbOk 1 display ok and cancel button
vbAbortRetryIgnore 2 display ignore,retry and ignore button
VbYesNoCancel 3 display yes,no and cancel button
vbYesNo 4 display yes and no button
vbRetryCancel 5 display retry and cancel button
MessageBox continue…….
 Return values(button): -

 vbOk 1
 vbCancel 2
 vbAbort 3
 vbRetry 4
 vbIgnore 5
 vbYes 6
 vbNo 7
InputBox in vb6.0

 InputBox displays a prompt in a dialog box and wait for


the user to input text or click a button , and return a
string containing the contents of the text box.

 Syntax:
 Variable=InputBox(prompt[, title][, default])
InputBox continue……….
 Here the prompt and title same as Msgbox

 Default-text:
 The default text that appears in the input field where
user can use it as his intended input or also user may
change to the message he wish to key in
Any query..?

You might also like