vbhelper
August 23rd, 2001, 02:39 AM
Could you tell me how to display text vertically in RichText Control?
On Windows 95, the text can be display vertically, however, on Windows 2000, it can not.
I tried another version of Richtx32.Ocx (Ver6.0.8877), but this resulted in the same.
If possible, I would like swich between Horizontal line to Vertical line or vice versa.
private Sub Writestyle(objGetRichRTF as RichTextBox, strReSetRichRTF as string, OptIndex as Integer)
Dim lngPosition as Long
Dim strLeft as string
Dim strRight as string
Dim lngTotalMoji as Long
Dim MoziStyle as string
Dim NewMoziStyle as string
Select Case OptIndex
Case 0
MoziStyle = "vertical"
NewMoziStyle = "horzontal"
Case 1
MoziStyle = "horzontal"
NewMoziStyle = "vertical"
End Select
lngPosition = InStr(objGetRichRTF.TextRTF, MoziStyle)
If lngPosition = 0 then
lngPosition = InStr(objGetRichRTF.TextRTF, NewMoziStyle)
End If
lngTotalMoji = len(objGetRichRTF.TextRTF)
strLeft = Left(objGetRichRTF.TextRTF, lngPosition - 1)
strRight = Right(objGetRichRTF.TextRTF, lngTotalMoji - (lngPosition + 6))
strReSetRichRTF = strLeft & NewMoziStyle & strRight
End Sub
private Sub Command1_Click()
Dim strReSetRich as string
Call Writestyle(RichTextBox1, strReSetRich, 0)
RichTextBox1.TextRTF = strReSetRich
RichTextBox1.Text = strReSetRich
End Sub
private Sub Command2_Click()
Dim strReSetRich as string
Call Writestyle(RichTextBox1, strReSetRich, 1)
RichTextBox1.TextRTF = strReSetRich
End Sub
On Windows 95, the text can be display vertically, however, on Windows 2000, it can not.
I tried another version of Richtx32.Ocx (Ver6.0.8877), but this resulted in the same.
If possible, I would like swich between Horizontal line to Vertical line or vice versa.
private Sub Writestyle(objGetRichRTF as RichTextBox, strReSetRichRTF as string, OptIndex as Integer)
Dim lngPosition as Long
Dim strLeft as string
Dim strRight as string
Dim lngTotalMoji as Long
Dim MoziStyle as string
Dim NewMoziStyle as string
Select Case OptIndex
Case 0
MoziStyle = "vertical"
NewMoziStyle = "horzontal"
Case 1
MoziStyle = "horzontal"
NewMoziStyle = "vertical"
End Select
lngPosition = InStr(objGetRichRTF.TextRTF, MoziStyle)
If lngPosition = 0 then
lngPosition = InStr(objGetRichRTF.TextRTF, NewMoziStyle)
End If
lngTotalMoji = len(objGetRichRTF.TextRTF)
strLeft = Left(objGetRichRTF.TextRTF, lngPosition - 1)
strRight = Right(objGetRichRTF.TextRTF, lngTotalMoji - (lngPosition + 6))
strReSetRichRTF = strLeft & NewMoziStyle & strRight
End Sub
private Sub Command1_Click()
Dim strReSetRich as string
Call Writestyle(RichTextBox1, strReSetRich, 0)
RichTextBox1.TextRTF = strReSetRich
RichTextBox1.Text = strReSetRich
End Sub
private Sub Command2_Click()
Dim strReSetRich as string
Call Writestyle(RichTextBox1, strReSetRich, 1)
RichTextBox1.TextRTF = strReSetRich
End Sub