检测自动换行字符 [英] Detect Word Wrap character

查看:124
本文介绍了检测自动换行字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VB应用程序,它有一个richtextbox,其中word wrap设置为true。我需要

才能将文本输出到文本文件,但它只是将文件作为一条长行放在

文件中。


如何用回车替换自动换行(即软回车)?

I have a VB app that has a richtextbox with the word wrap set to true. I need
to be able to output the text to a text file, but it just puts the text in
the file as one long line.

How do i replace word wrap (i.e. soft returns) with carriage returns?

推荐答案

" Jonathan Smith" <乔*********** @ discussions.microsoft.com> schrieb:
"Jonathan Smith" <Jo***********@discussions.microsoft.com> schrieb:
我有一个VB应用程序,它有一个richtextbox,word wrap设置为true。我需要
能够将文本输出到文本文件中,但它只是将文本作为一个长行放在文件中。

如何做我用回车替换自动换行(即软回车)?
I have a VB app that has a richtextbox with the word wrap set to true. I
need
to be able to output the text to a text file, but it just puts the text in
the file as one long line.

How do i replace word wrap (i.e. soft returns) with carriage returns?




文本框控件的VB6示例可以在这里找到:


< URL:http://www.activevb.de/tipps/vb6tipps/tipp0098.html>


我认为这种技术也可以应用于richtextbox控件。


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org />

VB< URL:http://classicvb.org/petition/>



A VB6 sample for the textbox control can be found here:

<URL:http://www.activevb.de/tipps/vb6tipps/tipp0098.html>

I assume that this technique can be applied to the richtextbox control too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


不幸的是我做的不知道任何德语,所以我不确定那个

代码是什么。


在一个非常简单的层面上,我需要知道什么是Chr()值得wordwrap

字符是(例如,回车是Chr(13)的方式)


" Herfried K. Wagner [MVP]" ;写道:
Unfortunately i do not know any german, so i am not exactly sure what that
code is.

At a very simple level, i need to know what Chr() value the wordwrap
character is (e.g. in the same way that carriage return is Chr(13) )

"Herfried K. Wagner [MVP]" wrote:
" Jonathan Smith" <乔*********** @ discussions.microsoft.com> schrieb:
"Jonathan Smith" <Jo***********@discussions.microsoft.com> schrieb:
我有一个VB应用程序,它有一个richtextbox,word wrap设置为true。我需要
能够将文本输出到文本文件中,但它只是将文本作为一个长行放在文件中。

如何做我用回车替换自动换行(即软回车)?
I have a VB app that has a richtextbox with the word wrap set to true. I
need
to be able to output the text to a text file, but it just puts the text in
the file as one long line.

How do i replace word wrap (i.e. soft returns) with carriage returns?



文本框控件的VB6示例可以在这里找到:

< URL:http ://www.activevb.de/tipps/vb6tipps/tipp0098.html>

我认为这种技术也可以应用于richtextbox控件。

- < MS Herfried K. Wagner
MVP< URL:http://dotnet.mvps.org/>
VB< URL:http://classicvb.org/petition/>



A VB6 sample for the textbox control can be found here:

<URL:http://www.activevb.de/tipps/vb6tipps/tipp0098.html>

I assume that this technique can be applied to the richtextbox control too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>



Jonathan,


我不知道任何Madarin,但是如果那个页面是用Madarin编写的,而不是

至少我会理解代码。


在德语中写道,使用代码的任何责任都在

用户自己休息。


比这还要好。

''Steuerelement:Listen-Steuerelement" List1"

控制列表框是List1


''Steuerelement:Schaltfl?che" Command1"

控制按钮是Command1


''Steuerelement:Textfeld" Text1"


控制文本框是text1


''Steuerelement:Beschriftungsfeld" Label1"

控制标签是Label1。


在我看来,任何开发人员都能够明白这个


在代码中不是一个字德语。


只是我的想法,


Cor
Jonathan,

I don''t know any Madarin, however if that page was written in Madarin, than
at least I would understand the code.

In German is written that any responsibility of the use of the code is at
the user himself for the rest.

Than there is this.
'' Steuerelement: Listen-Steuerelement "List1"
Control Listbox is List1

'' Steuerelement: Schaltfl?che "Command1"
Control button is Command1

'' Steuerelement: Textfeld "Text1"

Control textbox is text1

'' Steuerelement: Beschriftungsfeld "Label1"
Control label is Label1.

In my opinion would any developper be able to understand this

In the code is not one word German.

Just my thought,

Cor


这篇关于检测自动换行字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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