Results 1 to 7 of 7

Thread: Writing to files

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344
    Is there anyway to write files for wordpad? User underline, font color variation and font size, bold etc. Even maybe add a picture. Through vb code, and when they open that file you can see it like normal.
    -RaY
    VB .Net 2010 (Ultimate)

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    YOu could try using Richtextbox control, since you can make word documents and rtf's with it. I'm not sure how you make a picture but open a document with it and look at the RTFtext property of the control and find out what code you need to add pictures. To save and open files is just a method in the control.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    Give example

    If i wanted to write the "USERNAME:" in a doc, with the font size 13 and bold, how would i do that?
    -RaY
    VB .Net 2010 (Ultimate)

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Nothing hard:
    Code:
    With RichTextBox1
        .SelText = "USERNAME:"
        .Font.Bold = True
        .Font.Size = 13
    End With
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    Hrmm

    Is this still ligit to do in vb 3.0, I get a error over the . in seltext.......it high lights it.

    With RichTextBox1
    .SelText = "USERNAME:"
    .Font.Bold = True
    .Font.Size = 13
    End With
    -RaY
    VB .Net 2010 (Ultimate)

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    May 2000
    Posts
    344

    it says

    expected statement
    -RaY
    VB .Net 2010 (Ultimate)

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I'm not sure if you can get richtextboxes work in vb3, but i'm almost sure you can't use with. Try this instead:
    Code:
    RichTextBox1.SelText = "USERNAME:" 
    RichTextBox1.Font.Bold = True 
    RichTextBox1.Font.Size = 13
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width