我有两个问题: (1)我只想检查.txt文件是否为空(没有 打开它) 。就像我单击一个命令按钮然后它应该给出消息 EMPTY如果为空并且显示消息NON EMPTY如果它不是空的。 (2)在VB文本中打开记事本文件(C:\ XYZ \ abc.txt)有哪些步骤 Box。 谢谢
I have two questions: (1) I just want to check whether a .txt file is empty or not (without opening it). Like I click on a command button then it should give message EMPTY if is empty and show message "NON EMPTY" if it is not empty. (2) What are the steps to open a notepad file (C:\XYZ\abc.txt) in a VB Text Box. Thanks
推荐答案使用System.io.FileInfo类。 你会发现很多东西。 =) -CJ " Sender" <我们** @ domain>在留言中写道 news:ui **************** @ TK2MSFTNGP12.phx.gbl ... Use the System.io.FileInfo class. you''ll find much reading on that. =) -CJ "Sender" <us**@domain> wrote in message news:ui****************@TK2MSFTNGP12.phx.gbl... 我有两个问题: (1)我只想检查一个.txt文件是否为空(没有打开它)。就像我单击一个命令按钮然后它应该给出消息 EMPTY如果是空的并且显示消息NON EMPTY如果它不是空的。 (2)在VB 文本框中打开记事本文件(C:\ XYZ \ abc.txt)的步骤是什么。 /> 谢谢 I have two questions: (1) I just want to check whether a .txt file is empty or not (without opening it). Like I click on a command button then it should give message EMPTY if is empty and show message "NON EMPTY" if it is not empty. (2) What are the steps to open a notepad file (C:\XYZ\abc.txt) in a VB Text Box. Thanks
" Sender" <我们** @ domain> schrieb "Sender" <us**@domain> schrieb 我有两个问题: (1)我只想检查.txt文件是否为空(不打开它)。就像我点击一个命令按钮然后它应该给消息EMPTY如果是空的并且显示消息NON EMPTY如果它不是空的。 空文件是size = 0的文件? 使用Microsoft.VisualBasic.FileSystem.FileLen。 (2)在一个 VB文本框中打开记事本文件(C:\ XYZ \ abc.txt)的步骤是什么。 I have two questions: (1) I just want to check whether a .txt file is empty or not (without opening it). Like I click on a command button then it should give message EMPTY if is empty and show message "NON EMPTY" if it is not empty. An empty file is a file with size = 0? Use Microsoft.VisualBasic.FileSystem.FileLen. (2) What are the steps to open a notepad file (C:\XYZ\abc.txt) in a VB Text Box.
设置文本框''multiline property = True。另请参阅: < F1> Visual Studio.NET Visual Basic和Visual C# 参考 Visual Basic语言 Visual Basic语言导览 - >处理驱动器,文件夹和文件 .NET Framework 使用.NET Framework编程 - >使用I / O - Armin - 代表目录的树已从 本地化(德语)版本。请原谅轻微的偏差。
Set the Textbox'' multiline property = True. See also: <F1> Visual Studio.NET Visual Basic and Visual C# Reference Visual Basic language Visual Basic Language Tour -> Processing drives, folders and files .NET Framework Programming with .NET Framework -> Working with I/O -- Armin - The tree representing the table of contents has been translated from localized (German) version. Excuse slight deviations.
以流形式读取文件,并将流的内容分配到 文本框。你必须先把它转换为ASCII表示法。 看看这个链接..它应该让你通过它。 http://www-tcsn.experts-exchange ... _20670042.html HTH, Bill " Sender" <我们** @ domain>在留言中写道 news:ui **************** @ TK2MSFTNGP12.phx.gbl ... Read the file in as a stream and assign the contents of the stream to the text box. You''ll have to convert it first to an ASCII Representation.. check out this link..it should get you through it. www-tcsn.experts-exchange..._20670042.html HTH, Bill "Sender" <us**@domain> wrote in message news:ui****************@TK2MSFTNGP12.phx.gbl... 我有两个问题: (1)我只想检查一个.txt文件是否为空(没有打开它)。就像我单击一个命令按钮然后它应该给出消息 EMPTY如果是空的并且显示消息NON EMPTY如果它不是空的。 (2)在VB 文本框中打开记事本文件(C:\ XYZ \ abc.txt)的步骤是什么。 /> 谢谢 I have two questions: (1) I just want to check whether a .txt file is empty or not (without opening it). Like I click on a command button then it should give message EMPTY if is empty and show message "NON EMPTY" if it is not empty. (2) What are the steps to open a notepad file (C:\XYZ\abc.txt) in a VB Text Box. Thanks
更多推荐
在TextBox中打开记事本文件
发布评论