| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2126 人关注过本帖
标题:怎么样显示文件路径啊
只看楼主 加入收藏
wuyiyaoyao
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2005-5-8
收藏
 问题点数:0 回复次数:6 
怎么样显示文件路径啊
我在打开一幅图象时,可以在LABEL中显示文件的目录,但是不能显示具体的路径,谁有什么好招么?
搜索更多相关主题的帖子: 路径 文件 
2005-05-09 13:34
yushengou
Rank: 1
等 级:新手上路
帖 子:401
专家分:0
注 册:2005-3-30
收藏
得分:0 
string fileName=this.openFileDialog1.FileName;
this.label1.Text=fileName;
我这是打开一个文本文件的。
不知道图能不能用。你试试吧。

我是初学者,希望大家能多多帮助我 /bbs/showimg.asp?BoardID=34&filename=2005-4/200542294030151.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs./bbs/showimg.asp?BoardID=34&filename=2005-4/200542294030151.gif');}" onmousewheel="return imgzoom(this);" alt="" />
2005-05-09 14:59
yushengou
Rank: 1
等 级:新手上路
帖 子:401
专家分:0
注 册:2005-3-30
收藏
得分:0 
hoho
打开图也能看到路径。

我是初学者,希望大家能多多帮助我 /bbs/showimg.asp?BoardID=34&filename=2005-4/200542294030151.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs./bbs/showimg.asp?BoardID=34&filename=2005-4/200542294030151.gif');}" onmousewheel="return imgzoom(this);" alt="" />
2005-05-09 15:06
幻风幻云
Rank: 1
等 级:新手上路
帖 子:762
专家分:0
注 册:2005-1-14
收藏
得分:0 
X.FileName; 显示的就是绝对路径

2005-05-09 16:58
wuyiyaoyao
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2005-5-8
收藏
得分:0 
谢谢yushengou了,确实是那样子的,不过我每次运行程序后都要在LABEL里面用鼠标点一下路径才能显示出来,另外打开一幅图的时候也要用鼠标点一下路径才会变,你知道怎么回事吗?
2005-05-11 12:39
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
收藏
得分:0 
你label.text之前要refresh一下。
2005-05-11 13:08
yichen
Rank: 1
等 级:新手上路
帖 子:303
专家分:0
注 册:2005-3-9
收藏
得分:0 
你可以 在打开另一个图片时
把label.text清空

衣带渐宽终不悔, 为伊消得人憔悴。 纸上得来终觉浅, 绝知此事要躬行。
2005-05-14 19:29
快速回复:怎么样显示文件路径啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013159 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved