Introduction:-
Ok, so here I will show you the basics of the MsgBox Function!
Requirements:-- Visual Basic (preferibly 6.0)
Let's begin!
So the most basic method to display a Msgbox is:-
This will just show a msg box with an Ok Button!
But lets elaborate more on it:-
Code:
MsgBox "testing", vbOKOnly, "title"
This will display a msgbox with a title with an Ok Button

ok so thats the basic now lets elaborate more on out msgbox
Code:
msg = MsgBox("Testing", vbYesNoCancel)
If msg = vbYes Then Print "Yes Pressed"
If msg = vbNo Then Print "No Pressed"
If msg = vbCancel Then Print "Cancel Pressed"
and
Code:
msg = MsgBox("Testing", vbAbortRetryIgnore)
If msg = vbAbort Then Print "Abort Pressed"
If msg = vbRetry Then Print "Retry Pressed"
If msg = vbIgnore Then Print "Ignore Pressed"
Here a msg box with 3 buttons ( Yes, No, Cancel or Abort, Retry, Ignore) will be shown!
And if you see we added "msg = " here msg ( a variable )will hold in it what button the user pressed! then we are using the if...then so to make different actions, if different buttons are pressed!

ok now lets make an effect to our msgbox!!
Code:
msg = MsgBox("Testing", vbMsgBoxRtlReading + vbCritical)
This will display a msg box Inverted! ( the other way round )
After the "+" you can make every other type of msgbox you want and it will be inverted!!

And there are MUCH more MsgBoxes, I gave you the basics now you can elaborate on it!!
Ending:-
If you have any questions/problems/feedback pls post here and I will sureley Help you!
So I'm waiting for your feedback
Ow and if you want me to make you some tutorials request what you want and I will see what I can do! I will be happy making some tuts here!
Bookmarks