01.
private
void
buttonOpen_Click(
object
sender, EventArgs e)
02.
{
03.
openFileDialog1.Filter =
"Text File(*.txt)|*.txt"
;
04.
openFileDialog1.Multiselect =
true
;
05.
openFileDialog1.Title =
"เปิดไฟล์"
;
06.
openFileDialog1.ShowReadOnly =
true
;
07.
openFileDialog1.ShowHelp =
true
;
08.
09.
if
(openFileDialog1.ShowDialog() == DialogResult.OK) {
10.
textBox1.Text = File.ReadAllText(openFileDialog1.FileName);
11.
}
12.
}