Vb.net在文本框中显示文件字的副词 [英] Vb.net show contenent of a file word in a text box

查看:84
本文介绍了Vb.net在文本框中显示文件字的副词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Vb.net在文本框中显示文件字的含义





怎么可能?

我应该使用什么功能?打开对话框?=



谢谢大家,祝你有个美好的一天



我尝试了什么:



Vb.net show contenent of a file word in a text box


how is it possible ?
what function shall i use ? Open dialog ?=

Thanks guys, have a good day

What I have tried:

Vb.net show contenent of a file word in a text box


how is it possible ?
what function shall i use ? Open dialog ?=

Thanks guys, have a good day

推荐答案

如果这是真的VB.NET - 即Web应用程序 - 然后,不,您不能使用打开的对话框。这将在运行VB代码的机器上打开 - 服务器 - 而不是客户端,因此用户永远不会看到对话框。除非用户专门将它们上传给您,否则您无法从服务器代码访问用户计算机上的文件 - 因此客户端的对话框也没用。



停下来想想你到底要做什么:如果这是一个Web应用程序,那么你需要找出文件的位置,以及如何相当仔细地显示它们。



如果它不是基于网络的,那么请准确说明你要做什么,以及你有什么问题 - 记住我们看不到你的屏幕,访问你的硬盘,或者读懂你的想法,这样我们才能准确地得到你输入的内容。我们对您的应用程序,应该使用的环境或者您迄今为止编写的内容一无所知!
If this is really VB.NET - i.e. a web application - then, no, you can't use a open dialog. That would open on the machine running the VB code - the server - not the client, so the user would never get to see the dialog. And you can't access files from the user machine from server code at all unless the user specifically uploads them to you - so a dialog at the client would be of no use either.

Stop and think about exactly what you are trying to do: if this is a web application then you need to work out where the files are, and how you are going to display them fairly carefully.

If it isn't web based, then explain exactly what you are trying to do, and what problem you have with it - remember that we can't see your screen, access your HDD, or read your mind so we only get exactly what you type to work with. We know nothing about your application, the environment it is supposed to work in, or how you have written it so far!


获取文件名:OpenFileDialog类(System.Windows.Forms) [ ^ ] 。

打开并阅读文件: StreamReader类(System.IO) [ ^ ]。

提取所需的文本并将其显示在文本框中。
Get the file name: OpenFileDialog Class (System.Windows.Forms)[^].
Open and read the file: StreamReader Class (System.IO)[^].
Extract the text that you want and display it in the textbox.


这篇关于Vb.net在文本框中显示文件字的副词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆