-
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]
-
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
-
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.