Community discussion forum
Rich Text Box Controls
-
This thread is for discussions of Rich Text Box Controls.
-
Advertisement
Simply the fastest line-level profiler for .NET ever
“The low overhead means it has minimal impact on the execution of my program”
Mark Everest, Development Team Leader, Renault F1 Team Ltd.Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now
-
Can you help me out in printing the formated text in richtextbox.
-
Private Sub mnuPrintItem_Click()
'Prints the current document using the device
'handle of the current printer
RichTextBox1.SelPrint (Printer.hDC)
End Sub
-
Let me try the option u have mentioned , but will it work with vb.net need to be checked.
There is no option of
Richtextbox1.selprint(Printer.hdc) in vb.net that is only in VB6.
Thanks -
one thing you forgot - How do you toggle line wrapping on and off?!
hee hee thanks -
Hi!,
Could you tell me how to display the text in Justified manner in a RT Box?
I've tried just about everything (other than writing a new control
)
Tx and Regards -
When printing Rich Textbox text it seems to disregard the Current X/Y command. What gives>
-
By justify im assuming you meen Right, Left and Center. You need to use the
Code: object.SelAlignment
and one of the following;- vbLeftJustify
- vbRightJustify
- vbCenter
for example;
RichTextBox1.SelAlignment = vbCenter
or
RichTextBox1.SelAlignment = vbLeftJustify
Hope thats some help;
Luke
- vbLeftJustify
-
What I want is to present the text in a justified manner.
Not left, right or center.
Justified as in MS Word. ie, both left and right ends are aligned. -
VB has no bulit in functions or constants for what you want, im not gonna be much help here sorry!
-
Thanks for taking the trouble to reply, man.
Thanks a lot!
Now, where can I find the soln for this?
Quote: [1]Posted by phracker76 on 18 May 2002 07:38 PM[/1]
VB has no bulit in functions or constants for what you want, im not gonna be much help here sorry!
-
Hello KillerSheep,
Is this what you're looking for:
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Option Explicit
Public Const WMUSER = &H400
Private Const EMSETTARGETDEVICE = (WM_USER + 72)
Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal LParam As Long) As Long
Public Enum ViewModes
Default = 0
WordWrap = 1
WYSIWYG = 2
End Enum
Const EMFORMATRANGE As Long = WMUSER + 57
'** Set View Mode
Public Sub SetViewMode(ByVal ViewMode As ViewModes)
Select Case ViewMode 'Set View Mode
Case 0 'No Wrap
SendMessageLong rtfText.hWnd, EMSETTARGETDEVICE, 0, 1
Case 1 'Word Wrap
SendMessageLong rtfText.hWnd, EMSETTARGETDEVICE, 0, 0
Case 2 'WYSIWYG
On Error Resume Next
SendMessageLong rtfText.hWnd, EM_SETTARGETDEVICE, Printer.hdc, Printer.Width
End Select
End Sub
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
By -
K, first off. Right away you mension:
Object.Save (FilePath, FileType)
WHAT FILETYPES? Can it save in RTF, Text, and what are the corresponding numbers?????????????
Secondly, I am sure that in EVERY rich text editor I have ever used, you can set different indents for different paragraphs. Yet you do not mension how to align a paragraph... "is just like setting the alignment for a whole textbox."
Aside from that it was pretty good, but can't you also do Horizontal Rules in Rich Text? I know no-one normally does, but if ya can . . .
Thanks for the info though, I was always confused about the select stuff. -
6 years agoby
wiangube
William Antonio Guzmán Bernal
Colombia, United StatesJoined 6 years agoHave you tried the Multiline property?
-
Hi,
i am working with richtextbox quite a lot of time, but i am still wondering how can i input a picture in it. Also i have the point that i ignore some of his opportunities. So i would be glad if you could write something about them. Thank you on advance -
how ca i possiblly pasted any copied cell from .xls
-
Actually in the subscribe fo not use * because * 0 is 0 and will not have any effect. It is better to use +200 (approximetly) to have the result you want...
-
0 = rtf
1 = text -
I use the rich text box and insert in it the mschart object, but i can not refer to mschart property and metods with OLEOBJECTS.
help me pleas, help.
-
How can a Rich Text control justify completely a paragraph?
-
There are in the world some control that let me justify the text like word?
(I know that this cannot). -
Hi,
I am having problems in sending selected text to a rich text box control without selecting the text at runtime e.g. at runtime the rich text box contains the text "Selection" and when a command button is pressed the following text in BOLD is appended to the current text "IS EASY"
Selection IS EASY -
How to make subscripts and superscripts in DHTML editor using c#?
-
Bulleted indenting is fine.
But how to get number indentation?
Is there any way?
thank you -
Try the following code as work around:
' flag the section with bullet mark
rtfSectionText.SelBullet = True
' replace bullet with numbers
rtfSectionText.SelRTF = Replace(rtfSectionText.SelRTF, "\pnlvlblt", "\pndec", 1, -1, vbTextCompare)
I found som rtf documentation on the Microsoft site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec_16.asp
Hope it helps
-
I am wondering if thier is a way to save and load text formatting using VB6, for example fonts, text colors etc. Does anybody know any easy ways round it???
-
how to chane the bullet intend as arrow
-
how to get arrow intendation
-
hi redstar...
m also facing same problem.. do u got any solution?
with regards,
kailas
Post a reply
Quick links
Recent activity
- Ashok Singh replied to How to receive data in web ...
- Cheryl Tan replied to File Upload.. how?
- Bhim Singh replied to Problem after strong naming...
- Jack Russel replied to how do you hide all in VB6
- Barry Fensom replied to Problem with Input File
- Barry Fensom replied to Problem with Input File
Enter your message below
Sign in or Join us (it's free).