显示打开文件的路径 用一个openFileDialog来打开文件,之后用textBox显示所打开的文件的路径,请问怎样实现,最好给出代码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 if(openFileDialog.ShowDialog()==DialogResult.OK){ textBox1.Text=openFileDialog.FilePath;} TextBox.Text = openFileDialg.FileName private void btn1_Click_1(object sender, System.EventArgs e) { if(DialogResult.OK==openFileDialog1.ShowDialog(this)) { textBox1.Text=openFileDialog1.FileName; } } System.Windows.Forms.DialogResult result = this.openFileDialog1.ShowDialog();if (result == DialogResult.OK || result == DialogResult.Yes){ this.textBox1.Text = this.openFileDialog1.FileName;} c# 内部类、继承 依然是输出字符串问题 tabcontrol,在第一个tabpage做个搜索按钮,需要进度条,然后结果填充在第二个tabpage DropDownList 查询问题 listBox如何换行? 大家好 请教下c#游戏开发的事儿 请教打印思路 帮顶有分 .net有没用自带的snmp开发包,如果没有,有其他的适合.net的snmp开发包吗? .NET平台下贺卡制作源代码 急!急!急! C#如何使用VC++写到DLL里面的类 哪些控件有双击功能? c#的可执行程序能否在没有装framewrok下运行?
{
textBox1.Text=openFileDialog.FilePath;
}
private void btn1_Click_1(object sender, System.EventArgs e)
{
if(DialogResult.OK==openFileDialog1.ShowDialog(this))
{
textBox1.Text=openFileDialog1.FileName;
}
}
System.Windows.Forms.DialogResult result = this.openFileDialog1.ShowDialog();
if (result == DialogResult.OK || result == DialogResult.Yes)
{
this.textBox1.Text = this.openFileDialog1.FileName;
}