กล่องข้อความ
การแสดงผลด้วย MessageBox MessageBox เป็นการแสดงผลในรูปแบบกล่องข้อความ มีรูปแบบดังนี้ MessageBox.Show( "Message" , "Title" , Button , Icon , DefaultButton ); โดย Message คือ ข้อความที่ปรากฏในบนหน้าต่าง MessageBox Title คือ ข้อความที่ปรากฏบนแถบชื่อเรื่อง (Title Bar) Button คือ ปุ่มที่ให้ผู้ใช้เลือก หลังอ่านข้อความแล้ว Icon คือ สัญรูปที่เป็นภาพประกอบข้อความ DefaultButton คือ การกำหนดตำแหน่งปุ่มเริ่มต้น ปุ่มที่แสดงผล การเรียกใช้งาน ปุ่มที่ปรากฏ MessageBoxButtons.AbortRetryIgnore Abort Retry Ignore MessageBoxButton.OK OK MessageBoxButton.OKCancel OK Cancel MessageBoxButton.RetryCancel Retry Cancel MessageBoxButton.YesNo Yes No MessageBoxButton.YesNoCancel Yes No Cancel สัญรูปที่แสดงผล การเรียกใช้งาน สัญรูปที่ปรากฏ MessageBoxIcon.Asterisk MessageBoxIcon.Informat