Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 27th, 2006, 04:39 AM
Registered User
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rohithie
Default accessing the printer driver

Hi,
I wanna know how can I access a printer driver and print a test page with the VB form. please help.I wanna print a test page with click of a button in the VB form.

regards
Rohith


 
Old November 28th, 2006, 02:20 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I’m curious why you want to do this? Could you expound on that a bit?
 
Old November 29th, 2006, 05:55 AM
Registered User
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rohithie
Default

Dear Brian,
We use thermal printers for printing barcodes. I have made the sofyware for printing barcodes. But when I need to load the printer configuration I need to print a test page. I cannot ask my client to go an open the printer driver and do the settings. So I need to adda command button to print the test page and load settings.
Hope this is clear

Regards
Rohith

 
Old November 29th, 2006, 04:39 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Well, it's clear, but it seems like a lot of "hand-holding." If your user cannot set up the printer driver and print a test page they might also be unable to run your software. (I'm only thinking out loud; but when you buy Word, or AutoCAD, or whatever, the vendor expects you to set up your own printer. They give tips in help, but you must do this yourself. As I ponder this, it seems this is far and away the more common way things are done.)

Are you sure you can't ask the user to print a test page?

Of course, you could add a test output, and allow them to print that output using the same code that will eventually print the real data. If the test comes out in the wrong place, then the users can call you, or change their computer's configuration. Would that cover the needs?
 
Old November 30th, 2006, 01:04 AM
Registered User
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rohithie
Default

Dear Brian,
The problem is that the printer supplied by us has a issue that it dont save the configuration.We have a neck to neck competition with our competitor they would replace machine if we delay or give asolution that is unsatisfactory for the client when compared to our competitor. I tring my posibleways tosave the configuration.If i dont succeed I have to give them the test page option which is very simple to the user. As user level they dont like to access the printer driver and make any changes. This shouldbe done eveery time this printer isswiched on. Printing the test page evry time will show our printer and software a low profile.

Regards
Rohith


 
Old December 1st, 2006, 12:18 PM
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You want the SHInvokePrinterCommand API function with PRINTACTION_TESTPAGE


- Matt H
- http://blackbeltvb.com
 
Old December 21st, 2006, 04:32 AM
Registered User
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rohithie
Default

Dear Hart,

I couldnt find the API in the specfied website.


Regards
Rohith






Similar Threads
Thread Thread Starter Forum Replies Last Post
modem driver angelboy Linux 1 October 5th, 2007 03:27 PM
Windows printer driver pmoney C++ Programming 0 August 10th, 2006 04:12 PM
How to talk to printer driver? cl408e C# 0 August 8th, 2006 10:53 AM
Printer.Printer Problem!! Pls Help Me Chamin Access VBA 0 December 10th, 2004 07:08 AM
cloudscape driver include sivapmk J2EE 1 December 11th, 2003 11:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.