VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 307,012 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,036 people online right now. Registration is fast and FREE... Join Now!




save other content

 

save other content, font and color as well as text

mangoman

23 Sep, 2009 - 08:46 AM
Post #1

New D.I.C Head
*

Joined: 23 Sep, 2009
Posts: 24

CODE
PrintLine(1, Text1.Text, Text1.ForeColor, Text1.Font)


This code with the rest of my code saves the text however it doesn't save the text color or font to the RTF.
do you know how I could do this?

here is the rest of the code if this helps:

CODE
Public Sub saveas_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles saveas.Click
        
        cddOpen.Filter = "Rich Text Files (*.rtf)|*.rtf|Text Files (*.txt)|*.txt|All  Files (*.*)|*.*"
        cddSave.Filter = "Rich Text Files (*.rtf)|*.rtf|Text Files (*.txt)|*.txt|All  Files (*.*)|*.*"
        cddSave.ShowDialog()
        cddOpen.FileName = cddSave.FileName
        filename = cddOpen.FileName
        FileOpen(1, cddOpen.FileName, OpenMode.Output)
        PrintLine(1, Text1.Text, Text1.ForeColor, Text1.Font)
        FileClose(1)
        
        Me.Text = cddOpen.FileName & foreverlabel
End Sub


This post has been edited by mangoman: 23 Sep, 2009 - 08:51 AM

User is offlineProfile CardPM
+Quote Post


JackOfAllTrades

RE: Save Other Content

23 Sep, 2009 - 11:00 AM
Post #2

I exist to Google your problems.
Group Icon

Joined: 23 Aug, 2008
Posts: 5,316



Thanked: 454 times
Dream Kudos: 50
Expert In: Being annoyed with lazy people.

My Contributions
Moving to VB.NET
User is online!Profile CardPM
+Quote Post

mangoman

RE: Save Other Content

23 Sep, 2009 - 01:08 PM
Post #3

New D.I.C Head
*

Joined: 23 Sep, 2009
Posts: 24

Can anyone help?
User is offlineProfile CardPM
+Quote Post

AdamSpeight2008

RE: Save Other Content

23 Sep, 2009 - 01:47 PM
Post #4

The Bandido Coder
Group Icon

Joined: 29 May, 2008
Posts: 2,734



Thanked: 160 times
Dream Kudos: 3925
Expert In: vb.net, LINQ

My Contributions
Why not use a RichTextBox and then save the RTF string.
Plus you also using the vb6 method of saving.
User is offlineProfile CardPM
+Quote Post

mangoman

RE: Save Other Content

23 Sep, 2009 - 02:13 PM
Post #5

New D.I.C Head
*

Joined: 23 Sep, 2009
Posts: 24

Thats why I orignally posted it under vb6, but what would be the VB.net way of saving it?

This post has been edited by mangoman: 23 Sep, 2009 - 11:02 PM
User is offlineProfile CardPM
+Quote Post

mangoman

RE: Save Other Content

23 Sep, 2009 - 11:03 PM
Post #6

New D.I.C Head
*

Joined: 23 Sep, 2009
Posts: 24

Can anyone help?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 07:19AM

Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month