Click to See Complete Forum and Search --> : mdi text editor printing color text


hgv1
March 19th, 2009, 01:24 PM
hi all im trying to addapt my printing code so it will print my text what ever i have selected it to be in the text editor. here is the code i have at the moment can someone help me please.

Private Sub PrintDocument1_BeginPrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs) Handles mypdoc.BeginPrint
str = CType(Me.ActiveMdiChild, frmSplit).RTB.Text 'If this was a single text editor this line would read (str = mytext.text)
f = CType(Me.ActiveMdiChild, frmSplit).Font
b = New SolidBrush(Me.ActiveMdiChild.ForeColor)
strformat = New StringFormat()
strformat.Trimming = StringTrimming.Word
End Sub

Shuja Ali
March 19th, 2009, 02:11 PM
Help with what. Could you explain what exactly you are trying to do. There is no question mentioned in your post.

Also please use code tags when you are posting code here in forums.

hgv1
March 19th, 2009, 03:02 PM
i have a mdi text editor with as many child forms as i like. i have a function that i can change the colour and font of my text in any child form i want.

this is my problem.

when i goto print preview the text is black and normal size and not what i changed it to in the child form.

the code in the above post i made is not working correctly and i need help in making it right.

dglienna
March 22nd, 2009, 07:51 PM
That is in BEGIN PRINT, not PREVIEW, which is why you don't see it.

hgv1
March 23rd, 2009, 11:53 PM
That is in BEGIN PRINT, not PREVIEW, which is why you don't see it.

surly i would not have the same code in printpreview as i would in beginprint?

dglienna
March 24th, 2009, 12:22 AM
Just use the same class on two devices

hgv1
March 24th, 2009, 03:30 AM
Just use the same class on two devices

sorry im new to all of this!!

please take alook at my editor and you will see what i mean

hgv1
March 25th, 2009, 03:42 PM
just wondering how anyone is getting on with my issue. ive noticed that 8 people have downloaded my on going project, i really hope someone can help

dglienna
March 25th, 2009, 08:47 PM
Could have searched at least a little...

http://msdn.microsoft.com/en-us/library/ms996492.aspx