|
-
Aug 21st, 2000, 01:53 PM
#1
Thread Starter
Addicted Member
I would like to write to a richtextbox but it doesn't like it when I specify the font and all the headings and other stuff I would like to have appear inside the richtextbox. Can anyone help?
-
Aug 21st, 2000, 01:59 PM
#2
What is it you're trying to write and how are you doing it?
-
Aug 21st, 2000, 02:00 PM
#3
You mean you want the formatting to show?
Code:
RichTextBox1.LoadFile "MyFile", rtfText
[Edited by Megatron on 08-21-2000 at 03:03 PM]
-
Aug 21st, 2000, 02:11 PM
#4
Thread Starter
Addicted Member
Heres what I'm trying to write.
Private Sub PrintToObject()
Dim ctlname As String
Dim thisctl As Control
Dim FIN As Double
Dim BEG As Double
Dim w As Double
Dim w2 As Double
Dim w3 As Double
Dim c1 As Double
Dim c2 As Double
Dim c3 As Double
Dim J As Integer
'print headings
PrtObj.Font = "Courier"
PrtObj.FontSize = 14
PrtObj.Print 'Blank Line
PrtObj.Print Space(64) & frmCubeCupMain.txtDate
PrtObj.Print 'Blank Line
PrtObj.Print Space(30) & "Cube Cup" & Space(2) & "*" & Space(2) & frmCubeCupMain.txtCubeCupName & _
Space(2) & "*"
PrtObj.Print 'Blank Line
PrtObj.Print 'Blank Line
PrtObj.Print 'Blank Line
PrtObj.Print Space(5) & "Grams" & Space(4) & "Cube Wt." & Space(6) & "Grams" & _
Space(5) & "Cube Wt." & Space(7) & "Grams" & Space(6) & "Cube Wt."
PrtObj.Print 'Blank Line
'calculations
FIN = 280
BEG = FIN - 20.5
For w = BEG To FIN Step 0.5
w2 = w + 21
w3 = w2 + 21
c1 = w / (frmCubeCupMain.txtCVNumber * 0.06102338)
c2 = w2 / (frmCubeCupMain.txtCVNumber * 0.06102338)
c3 = w3 / (frmCubeCupMain.txtCVNumber * 0.06102338)
PrtObj.Print Tab(6); Format(w, "##0.0"); Tab(16); Format(c1, "#0.0"); _
Tab(29); Format(w2, "##0.0"); Tab(40); Format(c2, "#0.0"); _
Tab(54); Format(w3, "##0.0"); Tab(66); Format(c3, "#0.0")
J = J + 1
If J = 6 Then
PrtObj.Print
J = 0
End If
Next w
If ctlname = "PrtObj" Then
MsgBox "Click okay to view more"
thisctl.Cls
End If
End Sub
-
Aug 21st, 2000, 06:47 PM
#5
The Print statement can be used on Form, Printer and PictureBox objects it can't be used with a RTF box.
The type text in a RTF box use one or more of the following properties:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|