Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer settings at run-time
Message
 
To
21/02/1999 06:06:26
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00189772
Message ID:
00189784
Views:
18
Hi Walter,

I was going to respond on the original thread after doing some research, but thanks for posting this as a reminder for me.

There's one alternative that Ed didn't mention. I'm not sure if it's going to do the job you want, and it will take some work.

The DEVMODE structure that Ed mentioned is stored in the registry under HKEY_LOCAL_MACHINE\System\CurrentControlSet\control\Print\Printers\< Printer Name >. That last entry, of course, represents the printer name. Under that there's an entry named DefaultDevmode. What you could do is change the value and call SYS(3056) to force VFP to re-read the registry settings.

The only problem that may exist here is reading and writing the key. The Registry.prg (Registry.vcx in 6.0) can read it, but is only set up to write string, and the value stored is in binary format. You'd either have to modify that program or find another utility to do it. I think that Rick Strahl has a registry utility posted in the files section here. Since I've never used it I can't say right away whether or not it can deal with binary keys. If it is Rick's work, I'd bet that it probably does. If it isn't, my apologies to the author for forgetting who posted it.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform