Aligning Forms on a Dot Matrix Printer

I want to be able to align a form on a dot matrix printer (Generic Text Printer Driver under Win95). Under VB DOS, this was possible (not sure how, but I'm upgrading an old application from VBDOS to VB6). The way this was done was to print one line and then get the user to confirm if it's printing in the right place. If not, print a second alignment line. If that doesn't work, print a third and final line, and then print the paycheques (It's a cheque printing program). So, Is it possible to do this with VB6 and if so, how? Needed by Monday at the latest.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What you're talking about is called (or used to be, back in my mainframe days) a test pattern.  In VB you can do it something like this:

Dim iAnswer as Integer

    iAnswer = (MsgBox "Print another test pattern?", vbYesNo)
Loop Until iAnswer = vbNo


Private Sub PrintTestPattern ()
    'Code to print line(s) used for page alignment
End Sub

I believe (although I'm not entirely sure offhand) that you need the Printer.EndDoc to force the system to actually print out the page.  If you omit this line of code, I think what will happen is the print will be spooled but not printed until a later Printer.EndDoc is encountered or the program terminates.
Sorry, a typo crept in there.  That should have read:

    iAnswer = MsgBox ("Print another test pattern?", vbYesNo)

(The opening paren was misplaced.)
bhlangAuthor Commented:
Doesn't Printer.EndDoc force the printer to finish the page and spit it out thoush?
Yes, but that's what you need when you're printing a test pattern, generally speaking.  You're not going to start the "live" print on the same page as the test pattern ...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bhlangAuthor Commented:
Actually, I found the answer I needed in another question. Thanks for your help though. You get the points for trying to help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.