Thread View: fj.lang.visualbasic
2 messages
2 total messages
Started by Kensuke Yamaguchi
Fri, 20 Mar 1998 00:00
RichText Fieldで行頭を判断したい
Author: Kensuke Yamaguchi
Date: Fri, 20 Mar 1998 00:00
Date: Fri, 20 Mar 1998 00:00
9 lines
851 bytes
851 bytes
RichText Fieldで行頭もしくは改行を拾いたいのですが、うまい方法を教えて下さい。 lnStrで0E0Aを拾う方法は駄目でした。(TextBoxではO.K.) -- 山口健輔 <k_yama@liv.yamaha.co.jp> ヤマハリビングテック株式会社 情報システム部 システム技術課 TEL 053-485-1217 FAX 053-484-0090
Re: RichText Fieldで行頭を判断したい
Author: 市崎 大介
Date: Sat, 21 Mar 1998 00:00
Date: Sat, 21 Mar 1998 00:00
28 lines
1366 bytes
1366 bytes
Kensuke Yamaguchi wrote in message <35123545.9D8A955@liv.yamaha.co.jp>...
>RichText Fieldで行頭もしくは改行を拾いたいのですが、うまい方法を教えて下さ
い。
>lnStrで0E0Aを拾う方法は駄目でした。(TextBoxではO.K.)
拾うコードは0D0Aですよね?
改行コードをあらわす定数としてvbCrLfが定義されているので、
それを使うと間違いがなくてよいですよ。
以下のコードでテストしました。参考までに。
Dim intCount As Integer
Dim intHit As Long
intHit = 1
Do
intHit = InStr(intHit, RichTextBox1.Text, vbCrLf)
If intHit Then
intHit = intHit + 2
intCount = intCount + 1
End If
Loop While intHit
MsgBox intCount
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads