Solved

Blocking Rich Text Format?

Posted on 2004-09-08
2
582 Views
Last Modified: 2012-06-27
is there a way to block RTF? like these {\rtf1\ansi\ansicpg1252\deffo\deflang\1033\deflangfe1033{\fonttbl{\fo\fswiss\fprq2\fcharseto Verdana;}}{\colortbl;\red255\greeno\blueo;}\viewkind4\uc1\pard\nowidctlpar\cf1\fo\fs44 BLAH\par}, . because it messed up my colors, and since My RTB is to get text from a chatroom, people are spamming this like its a exploit.
0
Comment
Question by:andyakira
2 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
Comment Utility
Is it the size that bothers you? You could monitor it and reset it to your usual size.

RichTextBox1.TextRTF = "{\rtf1\ansi\ansicpg1252\deffo\deflang\1033\deflangfe1033{\fonttbl{\fo\fswiss\fprq2\fcharseto Verdana;}}{\colortbl;\red255\greeno\blueo;}\viewkind4\uc1\pard\nowidctlpar\cf1\fo\fs44 BLAH\par}"


RichTextBox1.SelStart = 1
RichTextBox1.SelLength = Len(RichTextBox1.Text)
If IsNull(RichTextBox1.SelFontSize) Then
    RichTextBox1.SelFontSize = 8.5
End If
0
 

Author Comment

by:andyakira
Comment Utility
that works very well but im haing a hard time to get it to work with my RTB can u assist me futher.


    For I = LBound(saElements) To UBound(saElements) Step 2
        With Form1.RTB
        .SelStart = 99999999
        .SelLength = 0
        .SelColor = saElements(I)
        .SelText = saElements(I + 1) & Left$(vbCrLf, -2 * CLng((I + 1) = UBound(saElements)))
        .SelStart = 99999999
        End With
    Next I
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

728 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

14 Experts available now in Live!

Get 1:1 Help Now