Results 1 to 5 of 5

Thread: Help me with printing

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    67

    Help me with printing

    I have a simple problem.
    I just want to print a string.

    I have string "My name is David" and I want to print it out.
    How?

    Thanks

    David

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Help me with printing

    The short answer is that you create a PrintDocument object, call its Print method and handle its PrintPage event. You use GDI+ to perform the actual printing inside the PrintPage event handler.

    The 2003 101 Samples contains a printing sample. If you're using 2005 then the project can be upgraded.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2005
    Posts
    67

    Re: Help me with printing

    Could you give me some code please?

    Thanks,

    David

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Help me with printing

    It's all in the 101 Samples, as I said. See my signature for a link. Alternatively you could read about the PrintDocument in the help/MSDN library. Be proactive.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: Help me with printing

    If you want to print out strings, then check out this .NET Printing Class

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