Results 1 to 12 of 12

Thread: Writing to a File:Changing Font Features

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Iowa
    Posts
    96

    Writing to a File:Changing Font Features

    I am currently workign on a project where I need to create a report for my client, The report is generated, and then written to word using the WriteLine method. I am wondering how i would change the font, font size, make the font italic bold, underlined etc etc... right now it is a string, but if there is a better way to do it, or that won't work then i'm willing to use something else!
    It is like wiping your ass with silk, I love it!

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    VB Code:
    1. Me.TextBox1.Font = New Font("Microsoft Sans Serif", 20, System.Drawing.FontStyle.Italic)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Iowa
    Posts
    96
    Um...i'm not displaying it into a textbox...I'm saving it in a .doc file...

    I want the file to look something like this

    Header
    Sub Header
    Information


    I know how to change what shows up in a text box, i'm not that n00bish lol
    It is like wiping your ass with silk, I love it!

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Hang on !I'll power up a demo for you !

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Iowa
    Posts
    96
    Aight, and if your demo doesnt work, i found something else that looks promising...
    It is like wiping your ass with silk, I love it!

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    It's here anyway .

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Iowa
    Posts
    96
    lol, uh...i don't think u got all of it into the rar file!! but thanks for trying, next time ur on update it if u will thanks!
    It is like wiping your ass with silk, I love it!

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    What do you mean , it's not working ??

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Iowa
    Posts
    96
    all i got was the source file...Maybe i downloaded it wrong, but i didnt even get any forms...let alone a project file...
    It is like wiping your ass with silk, I love it!

  10. #10
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    If you have winrar and VS.NET 2003 , then you won't have any problems running the project . I downloaded it and it's working . (if you're having problems converting the proj back to VS.NET 2002 , get the link below my sig.)

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Location
    Iowa
    Posts
    96
    Well that's not exactly what i meant, but i didnt think of using the FontDialog control, so i'll just use that to do what i need to do, thanks!!

    I'm doing everything automatically, the reports are created by the program, so i need the program to format it as well, the user doesnt type anything, they simply click Go, and then they choose what file they want to analyze, and then they choose where they want the reports to be saved... thanks!!
    It is like wiping your ass with silk, I love it!

  12. #12
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I know using FontDialog doesn't solve your problem and you can't use it for this situation at least. The demo meant to show you how to set font and save the file . You can , for example , select (search or autohighlight in RTB)the lines you want to change their font properties then set them before it's shown to the user (no Font Dialogs).

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