Results 1 to 7 of 7

Thread: [RESOLVED] Printer Page Setup Issue on Win 10

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Resolved [RESOLVED] Printer Page Setup Issue on Win 10

    MSDN says this about the PAGESETUPDLG structure:
    --------------------------------
    If PSD_MARGINS is not set, the system sets the initial widths to one inch for all margins.
    --------------------------------
    But my Win 10 machine defaults to 25 mm instead. I had to set the PSD_INTHOUSANDTHSOFINCHES flag in order to get 1 inch margins. Is this true for all Win 10 systems?

    J.A. Coutts

  2. #2
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: Printer Page Setup Issue on Win 10

    Have done no testing but wonder if Regional settings 'Measurement system' settings makes a difference. Alternatives here on my Win 10 are Metric and US, I'm in the UK and the default setting is Metric.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: Printer Page Setup Issue on Win 10

    Quote Originally Posted by Magic Ink View Post
    Have done no testing but wonder if Regional settings 'Measurement system' settings makes a difference. Alternatives here on my Win 10 are Metric and US, I'm in the UK and the default setting is Metric.
    I do believe you hit the nail on the head. It is not my computer that I tested, and when I checked it, it is set to English (Canada) and the Measurement System is set to Metric. Since I am using Twips and I have to convert, I cannot rely on the defaults that MSDN states when no flags are set.

    J.A. Coutts

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: [RESOLVED] Printer Page Setup Issue on Win 10

    Magic Ink;

    You seem to know a fair bit about printers, so let me ask this question. The Page Setup Dialog shows the Paper Size & Orientation, but only returns ptPaperSize.X and ptPaperSize.Y. Is it up to the program to figure out Paper Size & Orientation from the X & Y?

    J.A. Coutts

  5. #5
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: [RESOLVED] Printer Page Setup Issue on Win 10

    Sounds like you are using an API generated Page Setup Dialog of which I have no experience. I personally use the Microsoft VB Printer Dialog VbPrnDlg.dll ref. http://support.microsoft.com/default...b;en-us;322710, which gives me the behaviour documented in https://docs.microsoft.com/en-us/pre...45867(v=vs.60), note at the mid-bottom of that 'Setting a printer's Height or Width property automatically sets PaperSize to vbPRPSUser'. Orientation is Get/ Set in the Printer.Orientation Property.

    I guess your ptPaperSize.X and ptPaperSize.Y are returning Printer .Width/ .Height as per https://docs.microsoft.com/en-us/pre...517(v%3dvs.60)

  6. #6
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: [RESOLVED] Printer Page Setup Issue on Win 10

    http://support.microsoft.com/default...b;en-us;322710 whoops that's another dead link now! MSDN have been weeding again...

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2012
    Posts
    1,470

    Re: [RESOLVED] Printer Page Setup Issue on Win 10

    Quote Originally Posted by Magic Ink View Post
    Sounds like you are using an API generated Page Setup Dialog of which I have no experience.
    I am trying to more or less duplicate the functionality provided by NotePad. The Page Setup Dialogue allows the user to select (and save) the margins, paper size, & orientation. The print function presents the Printer Dialogue allowing a few more selections before printing.

    J.A. Coutts

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width