Results 1 to 3 of 3

Thread: Printing Txt out with a lined box around it?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Posts
    2

    Exclamation

    Ok here is the deal, I'm for the most part a beginner in VB
    so if you have a answer to my question, try and break it down to a beginner level. I have taken a very basic VB class.

    Ok Question:
    What I'm trying to do is write a program that basically print out txt not necessarily on notecards, but print the text on regular paper the size of a notecard(3x5, 4x6) with a lined box around the text so to have to look of a notecard on the paper, then can be cut out. I have no Idea on how I could accomplish this, I have looked many places for info and nothing yet.

    Also I want to be able to type up like 5 different note cards then have them print out as many as I can get(3 I think) on one peice of paper.


    Thanks in Advance for any help.

    NoClue...

    [email protected]

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    OK, this routine will raw some text with a box around it to a picturebox, If you want to put it on a form or the printer just change where it says Picture1 to Form1 or Printer.

    Code:
    Private Sub PrintBoxedText(PosX As Single, PosY As Single, Text As String)
    
    
        'Draw text
        Picture1.CurrentX = PosX
        Picture1.CurrentY = PosY
        Picture1.Print Text
        
        'Draw box
        'nb you need the picture1 in this line for some reason
        Picture1.Line (PosX - Picture1.TextWidth(" "), PosY - Picture1.TextWidth(" "))-(PosX + Picture1.TextWidth(Text & " "), PosY + Picture1.TextHeight(Text) + Picture1.TextWidth(" ")), , B
        
    
        
    End Sub
    Hope this helps

  3. #3
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Canada
    Posts
    264
    How are you with HTML ?

    You can make a VB program that creates HTML pages. It is easy to make a table with a border that would be in the center of the page and you can print this out with a web browser / you can put a browser component on your form, that would show it.

    If it sounds helpful, I will throw in some code for you.

    In the beginning the universe was created. This has made a lot of people very angry and is generally regarded as a bad idea.

    - Douglas Adams
    The Hitchhiker's Guide to the Galaxy

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