Need help?[Tutorial]MsgBox Fundamentals - MPGH - MultiPlayer Game Hacking & Cheats
[Tutorial]MsgBox Fundamentals
Posts 1–13 of 13 · Page 1 of 1
[Tutorial]MsgBox Fundamentals
[Tutorial] MsgBox Fundementals In Vb.net
On more then a few occasions questions have been raised in regards to MsgBox's , So, I fugure a MessageBox Tutorial is in order.
Code Snippets
Create a Standard MessageBox
Code:
MsgBox ("Your Message Here")
Or the one that is least known and least used
Code:
Interaction.MsgBox("Your Message Here")
Note: Both Work in the same capacity.
VB Abort, Retry , Cancel With Title
Code:
MsgBox("This is a messagebox with Abort, Retry Cancel, and You can set the Title of the messagebox", MsgBoxStyle.AbortRetryIgnore, "Title")
MsgBox and VbYes
Code:
Dim exitout As String
exitout = MsgBox("Would You Like To Exit?", Microsoft.VisualBasic.MsgBoxStyle.Exclamation + Microsoft.VisualBasic.MsgBoxStyle.YesNo + Microsoft.VisualBasic.MsgBoxStyle.MsgBoxHelp, "Title")
If exitout = vbYes Then
End
End If
Return a Value from msgbox
Code:
Dim ReturnV As Integer
ReturnV = MsgBox("This is a message box!",MsgBoxStyle.OKCancel + MsgBoxStyle******rmation + MsgBoxStyle.SystemModal, "Message Box")
If (ReturnV = MsgBoxResult.OK) Then
Label1.Text("OK button Has Been Clicked")
'Or use a messagebox, or a textbox or a listbox etc. etc. etc .
End If
Icons
You will notice in alot of these examples I am using the code
Code:
Microsoft.VisualBasic.MsgBoxStyle.Exclamation
This allows you to display the Microsoft message box icon/Style you would like to display
Here is the list of icons and style of MsgBox to display
Exclamation
Code:
Microsoft.VisualBasic.MsgBoxStyle.Exclamation
Information Icon
Code:
Microsoft.VisualBasic.MsgBoxStyle******rmation
Critical Error
Code:
MsgBoxStyle.OkCancel + MsgBoxStyle.Critical
Question
Code:
MsgBoxStyle.OkCancel + MsgBoxStyle.Question
Hope this helps.
thanks for posting this tutorial might help some newbs =P
I received 3 PM(s) At-least regarding message box's and there has been 1 maybe 2 posts thats 4-5 times... Figured , it needed to be done
Easy to understand! Good job as always
Grattz on 1300posts
Good work!
Requests for tutorials on messageboxes? What the f* do these kids get in school o__O
Originally Posted by Retoxified
Requests for tutorials on messageboxes? What the f* do these kids get in school o__O
Most kids "learning" vb only learn it because they can't comprehend C++.