我的代码是——
protected void BrowseButtonClick(object sender, EventArgs e)
{
Thread newThread = new Thread(new ThreadStart(ThreadMethod));
newThread.SetApartmentState(ApartmentState.STA);
newThread.Start();
}
void ThreadMethod()
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.ShowDialog();
BrowseTextBox.Text = string.Format("{0}/{1}", Path.GetDirectoryName(dlg.FileName), dlg.FileName);
}
请帮忙......