|
-
Jun 9th, 2000, 03:37 AM
#1
Does anyone know how to align things on a page while printing in vb?
sample page i want to print "dog" and "cat" in different places on the page.
---------------
| |
| Dog |
| |
| |
| Cat |
| |
---------------
is there a way i can have them print in a certian part of the page?
thansk yall
-
Jun 9th, 2000, 03:39 AM
#2
i guess yall will have to ignore my attempt at an exapmle.
-
Jun 9th, 2000, 05:10 AM
#3
Spaces!!!!
Try this
Code:
OutString = String(27,"-")& vbCrLf
OutString = OutString & "|" & space(25) & "|" & vbcrlf
OutString = OutString & "|" & text1.text & space(25-len(text1.text)) & "|" & vbcrlf
OutString = OutString & "|" & space(25) & "|" & vbcrlf
OutString = OutString & "|" & text2.text & space(25-len(text2.text)) & "|" & vbcrlf
OutString = OutString & "|" & space(25) & "|" & vbcrlf
OutString = Outstring & String(27,"-")
This example works if you use a font like courier new.
Hope this helps
-
Jun 9th, 2000, 09:13 AM
#4
no no no. I was trying to draw a page. I want to put certain things onplaces in the page. forget the |'s i just want to know how ot tell poages how to put a word at 2 inches down 3 accross. for example. thansk.
-
Jun 9th, 2000, 09:41 AM
#5
Re: Spaces!!!!
Originally posted by Negative0
Try this
Code:
OutString = String(27,"-")& vbCrLf
OutString = OutString & "|" & space(25) & "|" & vbcrlf
OutString = OutString & "|" & text1.text & space(25-len(text1.text)) & "|" & vbcrlf
OutString = OutString & "|" & space(25) & "|" & vbcrlf
OutString = OutString & "|" & text2.text & space(25-len(text2.text)) & "|" & vbcrlf
OutString = OutString & "|" & space(25) & "|" & vbcrlf
OutString = Outstring & String(27,"-")
This example works if you use a font like courier new.
Hope this helps
Negative0 is correct. If you use the space function, you can put things in a certain place. Or if you use a textbox, use Chr$(9) for spacing. That is, if that is what you are trying to do.
-
Jun 9th, 2000, 10:15 AM
#6
i am basically trying to fill in a form on paper by filling htings in a progrma, like the program asks for your name and it prints on the form where the name needs to go. the way your suggesting is mostly guess nad check is there another way?
-
Jun 9th, 2000, 10:50 PM
#7
Printing
Doing what you're trying to do is pretty easy once you get a feel for the printer object in VB.
1. Get comfortable with Twips, the units of measurement on a printed page.
2. Review GetDeviceCaps API so that you can find the unprintable area of the printer you're using
3. Read about the Printer.CurrentX and Printer.CurrentY methods to set the location of the printers next line
4. Use the Printer.Print method to print the text.
This should get you started. Email me if you need more help.
John
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|