Solved

Rich text box

Posted on 2002-07-05
3
215 Views
Last Modified: 2010-05-02
Can a user enter text in two different fonts(essentially two different languages) in a single richtext box? The user will enter text which is a combination of two different fonts which will be stored in the database. If it is not possible to do it with rich text box, what other control can be used for the above problem. Thanks in advance.
0
Comment
Question by:mkarthikeyan
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 100 total points
ID: 7131689
Using the SelFontName and SelFontSize you can format the selected text the given FontName and Size.
CHeers
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 7131768
Hello

Here's a sample to format text in RichTextBox
Private Sub Command1_Click()
  With RichTextBox1
    .Text = "Hello World"
    .SelStart = 0
    .SelLength = 5
    .SelFontName = "Tahoma"
    .SelFontSize = 20
    .SelStart = 6
    .SelLength = 11
    .SelFontName = "Times new roman"
    .SelFontSize = 18
    .SelItalic = True
  End With
End Sub

Best regards
0
 

Author Comment

by:mkarthikeyan
ID: 7133445
Thanks it worked out. But I am having problems when I retrieve it from the database and again show in the rich text box.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now