[Tutorial] 4# - Messagebox | Advanced
Tutorial #4
In this tutorial im going to show you how to make and use difficult messageboxes.
To make an yes & no messagebox you can use this code
[php] Dim Message As MsgBoxResult = MsgBox("Messagehere", MsgBoxStyle.YesNo, "Title")
If Message = MsgBoxResult.Yes Then
' Do something
Else
' Do something
End If[/php]
If you want an "normal" messagebox you can use any of the following codes:
[php]Interaction.MsgBox("MessageHERE", MsgBoxStyle.OkOnly, "Title")[/php]
or:
[php] MessageBox.Show("Messagehere", "Title", MessageBoxButtons.OK)[/php]
or:
[php] MsgBox("MessageHERE", MsgBoxStyle.OkOnly, "TITLE")
[/php]
Also if you want to make error messageboxes or warnings, you should read this: MsgBox Function (Visual Basic)
For the ppl who want to learn more, try understand this and how this code works:
[php]Dim msg As String
Dim title As String
Dim style As MsgBoxStyle
Dim response As MsgBoxResult
msg = "Do you want to continue?" ' Define message.
style = MsgBoxStyle.DefaultButton2 Or _
MsgBoxStyle.Critical Or MsgBoxStyle.YesNo
title = "MsgBox Demonstration" ' Define title.
' Display message.
response = MsgBox(msg, style, title)
If response = MsgBoxResult.Yes Then ' User chose Yes.
' Perform some action.
Else
' Perform some other action.
End If[/php]
End of tut
-hej
In this tutorial im going to show you how to make and use difficult messageboxes.
To make an yes & no messagebox you can use this code
[php] Dim Message As MsgBoxResult = MsgBox("Messagehere", MsgBoxStyle.YesNo, "Title")
If Message = MsgBoxResult.Yes Then
' Do something
Else
' Do something
End If[/php]
If you want an "normal" messagebox you can use any of the following codes:
[php]Interaction.MsgBox("MessageHERE", MsgBoxStyle.OkOnly, "Title")[/php]
or:
[php] MessageBox.Show("Messagehere", "Title", MessageBoxButtons.OK)[/php]
or:
[php] MsgBox("MessageHERE", MsgBoxStyle.OkOnly, "TITLE")
[/php]
Also if you want to make error messageboxes or warnings, you should read this: MsgBox Function (Visual Basic)
For the ppl who want to learn more, try understand this and how this code works:
[php]Dim msg As String
Dim title As String
Dim style As MsgBoxStyle
Dim response As MsgBoxResult
msg = "Do you want to continue?" ' Define message.
style = MsgBoxStyle.DefaultButton2 Or _
MsgBoxStyle.Critical Or MsgBoxStyle.YesNo
title = "MsgBox Demonstration" ' Define title.
' Display message.
response = MsgBox(msg, style, title)
If response = MsgBoxResult.Yes Then ' User chose Yes.
' Perform some action.
Else
' Perform some other action.
End If[/php]
End of tut
-hej

