Hi,
When you use a RichText box (I'm using Microsoft Control VB 6.0, OLE
Class: RichtextCtrl)
It is possible to store only the text in the table instead of the rft
format?
The problem is when you generate the report, it takes data from tables that
now have all the RFT format code, like the following:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fnil\fcharset0 MS
Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 test
It is so stupid!
Mel,
Montreal 4 4252
I don't know if this is any help, but I had a similar problem using Stephen
Leban's RTF2 Control
I still wanted the report to have an RTF control, but a different size font.
This function reduces (increases) the font by a fixed percentage(Amount = 20
reduces to approximately 20% of original)
NO GUARANTEES
Function ChangeRTFFontSize(RTFIn As String, Amount As Integer) As String
Dim TempStg As String, TempStgIn As String, TempStgOut As String
Dim i As Integer, j As Integer, k As Integer
Dim NumCount As Integer ' numeric count
Dim LengthChange As Integer ' lengthened or
shortened
Dim LengthShort As Integer
For i = 1 To Len(RTFIn)
i = InStr(i, RTFIn, "\fs") ' Find font size
setting
If i > 0 Then
NumCount = 0
For k = i + 3 To i + 6
If IsNumeric(Mid(RTFIn, k, 1)) Then
NumCount = NumCount + 1 ' How
many numbers
End If
Next k
TempStgIn = Mid(RTFIn, i, NumCount + 3) ' the 4,
5 or 6 figures
' Reduce the font size by amount percentage
TempStgOut = Mid(RTFIn, i, 3) & CStr(CInt(Mid(RTFIn, i + 3,
NumCount)) * Amount \ 100)
LengthChange = LengthChange + Len(TempStgOut) - Len(TempStgIn)
' Is it shorter or longer
TempStg = TempStg & Mid(Replace(RTFIn, TempStgIn, TempStgOut, ,
, vbTextCompare), j + 1, i + 3 + NumCount - j)
End If
If i <= j Then Exit For
j = i + 3 + NumCount ' move along
4, 5 or 6 letters
Next
LengthShort = Len(RTFIn) - Len(TempStg) + LengthChange
If LengthShort <> 0 Then
TempStg = TempStg & Right(RTFIn, LengthShort) ' missing
bits at end
End If
ChangeRTFFontSize = TempStg
End Function
"Mel" <mb******@NOSPAMcae.com> wrote in message
news:cr**********@dns3.cae.ca... Hi,
When you use a RichText box (I'm using Microsoft Control VB 6.0, OLE Class: RichtextCtrl) It is possible to store only the text in the table instead of the rft format? The problem is when you generate the report, it takes data from tables that now have all the RFT format code, like the following: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 test
It is so stupid! Mel, Montreal
Thank you but I only need to display the text without any formating on the
report.
the RichText control store all the RFT code in the tables, I want it to act
a bit like a TextBox.
"Phil Stanton" <di********@stantonfamily.co.uk> wrote in message
news:41***********************@mercury.nildram.net ... I don't know if this is any help, but I had a similar problem using
Stephen Leban's RTF2 Control
I still wanted the report to have an RTF control, but a different size
font. This function reduces (increases) the font by a fixed percentage(Amount =
20 reduces to approximately 20% of original)
NO GUARANTEES
Function ChangeRTFFontSize(RTFIn As String, Amount As Integer) As String
Dim TempStg As String, TempStgIn As String, TempStgOut As String Dim i As Integer, j As Integer, k As Integer Dim NumCount As Integer ' numeric count Dim LengthChange As Integer ' lengthened or shortened Dim LengthShort As Integer
For i = 1 To Len(RTFIn) i = InStr(i, RTFIn, "\fs") ' Find font size setting If i > 0 Then NumCount = 0 For k = i + 3 To i + 6 If IsNumeric(Mid(RTFIn, k, 1)) Then NumCount = NumCount + 1 '
How many numbers End If Next k TempStgIn = Mid(RTFIn, i, NumCount + 3) ' the
4, 5 or 6 figures ' Reduce the font size by amount percentage TempStgOut = Mid(RTFIn, i, 3) & CStr(CInt(Mid(RTFIn, i + 3, NumCount)) * Amount \ 100) LengthChange = LengthChange + Len(TempStgOut) - Len(TempStgIn) ' Is it shorter or longer TempStg = TempStg & Mid(Replace(RTFIn, TempStgIn, TempStgOut,
, , vbTextCompare), j + 1, i + 3 + NumCount - j) End If
If i <= j Then Exit For j = i + 3 + NumCount ' move
along 4, 5 or 6 letters Next
LengthShort = Len(RTFIn) - Len(TempStg) + LengthChange If LengthShort <> 0 Then TempStg = TempStg & Right(RTFIn, LengthShort) ' missing bits at end End If
ChangeRTFFontSize = TempStg
End Function "Mel" <mb******@NOSPAMcae.com> wrote in message news:cr**********@dns3.cae.ca... Hi,
When you use a RichText box (I'm using Microsoft Control VB 6.0, OLE Class: RichtextCtrl) It is possible to store only the text in the table instead of the rft format? The problem is when you generate the report, it takes data from tables that now have all the RFT format code, like the following: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 test
It is so stupid! Mel, Montreal
The RTF control has a Text property. Create and Unbound TextBox control
and set its Value property ot the Text property of a hidden/invisible
RTF control.
--
HTH
Stephen Lebans http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Mel" <mb******@NOSPAMcae.com> wrote in message
news:cr**********@dns3.cae.ca... Thank you but I only need to display the text without any formating on
the report. the RichText control store all the RFT code in the tables, I want it
to act a bit like a TextBox. "Phil Stanton" <di********@stantonfamily.co.uk> wrote in message news:41***********************@mercury.nildram.net ... I don't know if this is any help, but I had a similar problem using Stephen Leban's RTF2 Control
I still wanted the report to have an RTF control, but a different
size font. This function reduces (increases) the font by a fixed
percentage(Amount = 20 reduces to approximately 20% of original)
NO GUARANTEES
Function ChangeRTFFontSize(RTFIn As String, Amount As Integer) As
String Dim TempStg As String, TempStgIn As String, TempStgOut As String Dim i As Integer, j As Integer, k As Integer Dim NumCount As Integer ' numeric
count Dim LengthChange As Integer ' lengthened
or shortened Dim LengthShort As Integer
For i = 1 To Len(RTFIn) i = InStr(i, RTFIn, "\fs") ' Find font
size setting If i > 0 Then NumCount = 0 For k = i + 3 To i + 6 If IsNumeric(Mid(RTFIn, k, 1)) Then NumCount = NumCount + 1
' How many numbers End If Next k TempStgIn = Mid(RTFIn, i, NumCount + 3) '
the 4, 5 or 6 figures ' Reduce the font size by amount percentage TempStgOut = Mid(RTFIn, i, 3) & CStr(CInt(Mid(RTFIn, i +
3, NumCount)) * Amount \ 100) LengthChange = LengthChange + Len(TempStgOut) -
Len(TempStgIn) ' Is it shorter or longer TempStg = TempStg & Mid(Replace(RTFIn, TempStgIn,
TempStgOut, , , vbTextCompare), j + 1, i + 3 + NumCount - j) End If
If i <= j Then Exit For j = i + 3 + NumCount '
move along 4, 5 or 6 letters Next
LengthShort = Len(RTFIn) - Len(TempStg) + LengthChange If LengthShort <> 0 Then TempStg = TempStg & Right(RTFIn, LengthShort) '
missing bits at end End If
ChangeRTFFontSize = TempStg
End Function "Mel" <mb******@NOSPAMcae.com> wrote in message news:cr**********@dns3.cae.ca... Hi,
When you use a RichText box (I'm using Microsoft Control VB 6.0,
OLE Class: RichtextCtrl) It is possible to store only the text in the table instead of the
rft format? The problem is when you generate the report, it takes data from
tables that now have all the RFT format code, like the following:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 test
It is so stupid! Mel, Montreal
On Wed, 5 Jan 2005 09:38:01 -0500, "Mel" <mb******@NOSPAMcae.com>
wrote: Hi,
When you use a RichText box (I'm using Microsoft Control VB 6.0, OLE Class: RichtextCtrl) It is possible to store only the text in the table instead of the rft format? The problem is when you generate the report, it takes data from tables that now have all the RFT format code, like the following: {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttb l{\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 test
It is so stupid! Mel, Montreal
Hi
Doesn't the control have a Text property? The .NET one has. You can
use this maybe to store a text-only version of the field in another
column in the table.
David This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Frank Gewalt |
last post by:
Hi
My problem is that unicode fonts like cyrillic fonts are not shown
correctly in combo boxes with Windows 98. I'm using 'MS Sans Serif'
and 'Tahoma' fonts. Has somebody a solution for that?
|
by: DigitalGENOcyde |
last post by:
I am fairly new to working with programming so pardon my lack of knowledge,
but I was hoping someone could assist me with working on a project. I am
trying to make a Windows application using...
|
by: cj |
last post by:
Lets just take this example I'm looking at now. I'm looking at the help
screen titled .NET Framework Class Library FolderBrowserDialog Class
. It gives an example at the bottom that begins with:...
|
by: MLH |
last post by:
I did these 4 steps to create a topic file
1 Open a new file in a word processor or text editor that can
handle rich text format.
2 Write your individual topics, separating each topic with a...
|
by: gunimpi |
last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431
********************************************************
VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help
wanted...
|
by: Neil |
last post by:
Just found out that the Microsoft Rich Textbox does not support full text
justification, since it's based on Version 1.0 of the RichEdit Window Class,
and full text justification is only available...
|
by: tvance929 |
last post by:
Can someone tell me, is there a way to format the text within the coding side of the rich text box?
In other words, when someone clicks a button I send a message to a rich text box. In that...
|
by: lnong |
last post by:
Im using the ActivePDF Toolkit to programmatically fill in a PDF document using .NET. I have a mulitline textfield (textbox), and I want to be able to insert a newline character. I cannot find a...
|
by: tristanlbailey |
last post by:
I been scouring the Internet for an answer to my problem, and a couple of times thought I had almost found the answer, but still to no avail.
I'm tying to use the Rich Edit class (riched20.dll),...
|
by: ARC |
last post by:
Hello all,
My app has an e-mailing feature where you can e-mail reports, as well as a
bulk e-mail feature for e-mailing all customers (as separate e-mails). I
allow the user to set the subject...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
| |