Pages

Total Pageviews

Add This

Showing posts with label MsgBox. Show all posts
Showing posts with label MsgBox. Show all posts

Monday, June 6, 2011

Get the month Name

You have to create a button and write the code bellow:

Dim getdate As Date
getdate = Now
 

MessageBox.Show("Month name: " & getdate.ToString("MMMM"), _
    "Date exercise")


When you execute the form you will get the same as on the picture:

Get Weekday name

To get the WeekDay name you have to create a button like on the picture bellow:




After, write the code:

    Dim getdate As Date

        getdate = Now

        MessageBox.Show("Weekday name: " & getdate.ToString("dddd"), _
    "Date exercise")


The resul is as on the picture bellow:

Display the content of the TextBox

To display the content of the TextBox to MsgBox create a button and write the code bellow:

 MessageBox.Show(txtInput.Text, "Display")