我正在使用vb 2005 [英] I'm using vb 2005

查看:100
本文介绍了我正在使用vb 2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过单击列表框中的按钮来打开一个名为"engilsh.dic"的文本文件.名称和文本保持不变?

How do i open a text file which is called "engilsh.dic" by clicking a button into a listbox. name and text remain unchanged?

推荐答案

不确定我是否理解您的问题.

如果您要在列表框中显示文本文件的内容,
您需要解析文件,然后在列表框中弹出相关数据.
Not sure I understand your question.

If you mean you want to display contents of a text file in a list box,
You need to parse your file and then popuplate the list box with relevant data.


您应该购买一本书并阅读.您还应该考虑如何使用VB 2005发布我"不是主题.读取文本文件可能是此问题的有效主题.

System.IO.File将使您能够读取文件.您剩下的问题几乎是荒谬的.怎么打开?要将内容放入列表框?然后,您需要阅读它们,如果您只想显示文件中的行,则File.ReadAllLines将为列表框提供有效的数据源.什么/从什么的名称和文字?你在说什么?
You should buy a book and read it. You should also think about how you post ''I''m using VB 2005 is not a subject. Reading a text file is perhaps a valid subject for this question.

System.IO.File will give you access to reading files. The rest of your question is pretty much nonsensical. Open it how ? To put the contents into a listbox ? Then you need to read them, File.ReadAllLines will give you a valid datasource for a listbox if you just want to show the lines in the file. Name and text of what/from what ? What are you talking about ?


这篇关于我正在使用vb 2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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