Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer settings at run-time
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00189772
Message ID:
00190399
Views:
19
>Ed / Walter / George:
>
>I've been lurking on this thread trying to solve a problem that has been plaguing me for quite a while. I think i've got all of the pieces to the puzzle now I just need a hammer to make them fit!
>
>What I'm trying to do it get the output from a set device to print into landscape mode.
>
>I've been following the discussion between you 3 about:
>
>>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.
>
>My guess is if I could read that registry key into one of those class heaps (or a string?), and somehow change the right byte from a 1 to a 2, I could write the whole mess back to the registry and call sys(3056)?
>
>Can you tell me where you got the information the the Default Devmode for the printer context in VFP was written to the above registry key mentioned. I've never seen that before and it sounds like a good reference.
>
>Can you give me any guidance/mentoring/help!!
>
>Thanks again, and stop by - the round is on me!
>
>
>Scott Vanden Elzen
>scott@westonmedical.com

I got the information by doing a search with the registry editor. Many API calls actually retrieve the information from the registry without all the hassle of defining and opening keys, etc. BTW, the dmfields member of the DEVMODE structure has to indicate that the member dmOrientation has been initialized.

Here's another reference that might be of help. Look at Q140285 at the MS KB.
George

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

Click here to load this message in the networking platform