Yes or No ? [VB08]
Use this board to post your code snippets - tips and tricks
8 posts
Page 1 of 1
Hi ,
In this tutorial ,
You will learn how to use MessageBox Yes or No function in Visual Basic 2008 . I have made it as easy as possible . So , let's get started .
----------------------------Tutorial Starts--------------------------------
1. As usual , open up Visual Basic 2008 > Create a new project > Place a button on the form
2. Double click on the button & paste in this code
-----------------------------Tutorial Ends-------------------------------
wahooo; Hope you like it ! Cheers
TheET.
In this tutorial ,
You will learn how to use MessageBox Yes or No function in Visual Basic 2008 . I have made it as easy as possible . So , let's get started .
----------------------------Tutorial Starts--------------------------------
1. As usual , open up Visual Basic 2008 > Create a new project > Place a button on the form
2. Double click on the button & paste in this code
Code: Select all
That's it . You can further enhance this code to your needs . I'm just giving you an opinion to how to do it .Dim result As MsgBoxResult
result = MsgBox("Click yes or no", MessageBoxButtons.YesNo, "Title")
If result = MsgBoxResult.Yes Then
msgbox("You clicked YES!")
else
msgbox("You clicked NO!")
End if
-----------------------------Tutorial Ends-------------------------------
wahooo; Hope you like it ! Cheers
TheET.
Well i must say i think thats the shortest i have seen it done, but i dunno, Thanks for the tutorial Now i know how to code that ![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
yeah and i was wondering too.
‼ <----- Copy it,it is together and if you backspace it it will both erase
☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"<-----Some Cool symbols.
♂<-----Boy Symbol![Smile :)](./images/smilies/icon_e_smile.gif)
²ƽ<--------Mini 2 and 5!
ð<----Not sure what it is.
☺☻<-----Smiles
♪♫<----Music Notes
Others:ß┬ƒ○║■ã¿┼↑
☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"<-----Some Cool symbols.
♂<-----Boy Symbol
![Smile :)](./images/smilies/icon_e_smile.gif)
²ƽ<--------Mini 2 and 5!
ð<----Not sure what it is.
☺☻<-----Smiles
♪♫<----Music Notes
Others:ß┬ƒ○║■ã¿┼↑
lol you can do this to ^^:
Code: Select all
No need to use the No ^^ it wont do anything :PDim m = msgbox("Are you gonna exit me :(?, MsgboxStyle.YesNo)
If m = vbYes Then
me.close
End if
You can also change the DialogResult property of a button already on a form - so when you call Form1.ShowDialog() you can do the same thing but it could be using your own layout for the dialog.
is there a way to do this with messageboxEx by DotNetBar
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
Can't say I've used DotNetBar before but according to MSDN the MessageBoxEx and MessageBox functions work the same way.
8 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023