Showing posts with label MessageBox. Show all posts
Showing posts with label MessageBox. Show all posts

Thursday, April 18, 2019

VB.NET ขึ้นบรรทัดใหม่

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim strInfo As String
        strInfo = " บรรทัดที่ 1 "
        strInfo &= vbCrLf & " บรรทัดที่ 2 ใช้ vbCrLf "
        strInfo &= vbNewLine & " บรรทัดที่ 3 ใช้ vbNewLine "
        strInfo &= Environment.NewLine & " บรรทัดที่ 4 ใช้ Environment.NewLine "
        strInfo &= Constants.vbCrLf & " บรรทัดที่ 5 ใช้ Constants.vbCrLf "
        strInfo &= Chr(13) & " บรรทัดที่ 6 ใช้ Chr(13)"
        MessageBox.Show(strInfo, "ทดสอบ", MessageBoxButtons.OK)
    End Sub

Wednesday, August 15, 2018

MessageBox ใช้บ่อย

MessageBox.Show("บันทึกรายการเรียบร้อยแล้ว ", "ผลการทำงาน", MessageBoxButtons.OK, MessageBoxIcon.Information)

Tuesday, August 14, 2018

MsgBox ที่ใช้บ่อย

        If MsgBox("Are you sure?", MsgBoxStyle.YesNo, "Warning") <> MsgBoxResult.Yes Then
            Exit Sub
        End If

Sunday, September 29, 2013

VB.net MessageBox


Select Case MsgBox("Your Message", MsgBoxStyle.YesNoCancel, "caption") Case MsgBoxResult.Yes MessageBox.Show("Yes button") Case MsgBoxResult.Cancel MessageBox.Show("Cancel button") Case MsgBoxResult.No MessageBox.Show("NO button") End Select