아래의 소스에서 'AutoUpgradeEnabled'를 false로 하지 않으면,
네트웍 체크하느라 해당 Form의 기능이 정지 되어 버립니다.
OpenFileDialog ofd = new OpenFileDialog();
{
ofd.AutoUpgradeEnabled = false;
ofd.InitialDirectory = "C:\\";
ofd.RestoreDirectory = true;
ofd.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
ofd.FilterIndex = 0;
if (ofd.ShowDialog() == DialogResult.OK)
{
try
{
FileName.Text = ofd.FileName;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
'Programming' 카테고리의 다른 글
[C#] 프로그레스바 건드리기 (0) | 2011.10.27 |
---|---|
[C#] 시리얼 포트 사용하기 (0) | 2011.10.27 |
[C#] 타이머 사용하기 (0) | 2011.10.27 |
[C#] 파일 선택 다이얼로그 박스 열기 (0) | 2011.10.25 |
[C#] 다중 스레드에서 다른 스레드 억세스 에러 (0) | 2011.10.25 |