Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Results from GETPRINTER() in VFP9

Status
Not open for further replies.

MgtHargreaves

Programmer
May 12, 2006
33
GB

The VFP9 help states that 'the contents of the Printer dialog box can vary between versions of Windows'. We have one customer where the dialog box is not appearing at all - this is an XP Professional machine. On XP Home machines it does appear, but does not give the 'properties' option which it used to in VFP3.

Is there a full list somewhere of what appears under which versions of Windows - and is it possible to change how they work.

Thank you
 
I don't know about any complete list, but besides GETPRINTER(), also take a look at:

APRINTERS( ) Function
SET PRINTER Command
SYS(102) - Printer Setting
SYS(1037) - Page Setup Dialog Box

As for why it isn't showing up at all, are there by chance no printers installed on that computer?


-Dave Summers-
[cheers]
Even more Fox stuff at:
 

MgtHargreaves,

Dave's given you some good options, but be aware that SYS(1037) works fundamentally differently from GETPRINTER(). The SYS function actually implements the choices the user makes in the dialogue, whereas GETPRINTER() simply returns the name of the selected printer driver; it's up to you to do something useful with it.

If all else fails, I suggest you use APRINTERS() to roll your own printer dialogue.

Dave,

You mentioned the possibility of there being no printers installed. In my experience, that would give a "driver not ready" error -- but that might have changed in recent versions.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 

Thanks for that guys.

Dave there is definitely a printer attached to the machine, because it prints directly, whereas before there was the option, via the dialog box to change the print quality.

This is a routine which uses MS WORD to produce a document - it has been working for 6 years under VFP3 on all the variations of Windows. Now having moved directly to VFP9 ( I know it was about time !!!) it appears to behave directly - I guess that is progress!

APRINTERS() looks lke it may be the way to go.
 

Just had an email from the customer - they can see the dialog box. It was hidden under the McAfee error message ( see separate thread).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top