|
-
Mar 15th, 2001, 11:51 AM
#1
Thread Starter
Member
Printer.Print Tab(3); .lblOperationBC.Item(1).Caption; Tab; Tab; Tab; Printer.CurrentX; .lblOperationBC.Item(1).Caption
I am trying to line up a column to print badges the size of id cards
can anyone tell me how to get over to differents spots.
like if i want to print "hello world" tab over a bit and print "hello world" again
and the next line i want to print the same thing only with a number "1" instead of hello world. only i am doing it in a loop and need to make sure that i start the second column over far enouogh
-
Mar 15th, 2001, 11:59 AM
#2
Lively Member
You can use Spc(#) to choose how many spaces you want before the next word. Or you can you the preset columns if you like. If you wanted a line to read:
"Hello World Hello World"
and the next line to read:
"Hello World 1"
You would use:
Printer.Print "Hello World";Spc(10);"Hello World
Printer.Print "Hello World";Spc(10);"1"
Or you could use:
Printer.Print "Hello World", ,"Hello World"
Printer.Print "Hello World", ,"1"
And the second "Hello World" form the first line would be lined up with the "1" from the second line.
If you need any more help, or if I looked at your question wrong just let me know.
I noticed that the spaces don't show up in my example, but there should be exactly 10 spaces between the seperate output.
-
Mar 15th, 2001, 12:03 PM
#3
Thread Starter
Member
well the thing is i want the second column to be aligned at the same spot no matter what the length of the first collumn is
first column--------second column
hello world---------hello world
1---------------------1
and i need somehow to get the second column to start there.
Note the ---- would be spaces or tabs not the - symbol
-
Mar 15th, 2001, 12:09 PM
#4
Lively Member
Ok, then just use the commas to seperate. Then they will be in seperate print zones.
EXAMPLE:
Printer.Print "Hello World", "Hello World"
Printer.Print "Hello World", "1"
Would have the second column lined up, since they are printing in seperate print zones. If what you are putting in Zone1 is too large (i.e. a full name) you will need to put Zone2 more print zones away for every comma you use the next item you send to print will move over one print zone. As far as I know the print zones are predefined and cannot be switched, unless someone knows how to do that.
Matt
-
Mar 15th, 2001, 12:12 PM
#5
Fanatic Member
Use TAB(n) to tell the printer which column to print in.
Code:
Private Sub Command1_Click()
Printer.Print Tab(10); "Hello World"; Tab(30); "Hello World"
Printer.Print Tab(10); "1"; Tab(30); "Hello World"
Printer.EndDoc
End Sub
The above code will print the first field in column 10 and the second field in column 30.
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
|