1.先建立一個實體
2.定義較常使用的屬性
Code Sample:
OpenFileDialog ofd1 = new OpenFileDialog();
ofd1.Title = "請選擇檔案";
ofd1.InitialDirectory = "D:";
ofd1.Filter = "txt files (*.log)|*.txt|All files (*.*)|*.*";
if (ofd1.ShowDialog(this) == DialogResult.OK)
{
............略
}
沒有留言:
張貼留言