本文介绍了在TextBox中打开记事本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个问题:


(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

推荐答案






设置文本框''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.




这篇关于在TextBox中打开记事本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 15:27
查看更多