MsgBox Function

एउटा सन्देश समावेश भएको संवाद बाकस प्रदर्शन गर्दछ र एउटा मान फर्काउँछ ।

Syntax:


MsgBox (Prompt As String [,Buttons = MB_OK [,Title As String]]) As Integer

Parameters:

prompt: String expression displayed as a message in the dialog box. Line breaks can be inserted with Chr$(13).

title: String expression displayed in the title bar of the dialog. If omitted, the title bar displays the name of the respective application.

buttons: Any integer expression that specifies the dialog type, as well as the number and type of buttons to display, and the icon type. buttons represents a combination of bit patterns, that is, a combination of elements can be defined by adding their respective values:

नामाङ्कित अचल

इन्टिजर मान

परिभाषा

MB_OK

0

'ठीक छ' बटन मात्र प्रदर्शन गर्नुहोस्।

MB_OKCANCEL

1

'ठीक छ' र 'रद्द गर्नुहोस्' बटनहरू प्रदर्शन गर्नुहोस्।

MB_ABORTRETRYIGNORE

2

Display Abort, Retry, and Ignore buttons.

MB_YESNOCANCEL

3

'हो', 'होइन' र 'रद्द गर्नुहोस्' बटनहरू प्रदर्शन गर्नुहोस्।

MB_YESNO

4

'हो' र 'होइन' बटनहरू प्रदर्शन गर्नुहोस्।

MB_RETRYCANCEL

5

'पुन: प्रयास गर्नुहोस्' र 'रद्द गर्नुहोस् ' बटनहरू प्रदर्शन गर्नुहोस्।

MB_ICONSTOP

16

Add the Stop icon to the dialog.

MB_ICONQUESTION

32

संवादमा प्रश्न प्रतिमा थप्नुहोस्।

MB_ICONEXCLAMATION

48

Add the Exclamation Point icon to the dialog.

MB_ICONINFORMATION

64

संवादमा सूचना प्रतिमा थप्नुहोस्।

128

पूर्वनिर्धारित बटनको रूपमा संवादमा पहिलो बटन।

MB_DEFBUTTON2

256

पूर्वनिर्धारित बटनको रूपमा संवादमा दोस्रो बटन।

MB_DEFBUTTON3

512

संवादमा पूर्वनिर्धारित बटनको रूपमा तेस्रो बटन।


Return value:

इन्टिजर

नामाङ्कित अचल

इन्टिजर मान

परिभाषा

IDOK

1

ठीक छ

IDCANCEL

2

रद्द गर्नुहोस्

IDABORT

3

परित्याग गर्नुहोस्

IDRETRY

4

फेरि प्रयास गर्नुहोस्

IDIGNORE

5

उपेक्षा गर्नुहोस्

IDYES

6

हो

IDNO

7

होइन


त्रुटि सङ्केतहरू

5 अवैध कार्य-विधि कल

उदाहरण:


Sub ExampleMsgBox
Dim sVar As Integer
 sVar = ("लास भेगाज")
 sVar =MsgBox("लास भेगाज",१)
 sVar = MsgBox( "लास भेगाज",२५६ + १६ + २,"संवाद शीर्षक")
 sVar = MsgBox("Las Vegas", MB_DEFBUTTON2 + MB_ICONSTOP + MB_ABORTRETRYIGNORE, "Dialog title")
End Sub

कृपया हामीलाई समर्थन गर्नुहोस्!