Share via

How to cancel the "print preview" option in the printer preferences by coding?

szmm 25 Reputation points
2024-04-10T04:00:43.3266667+00:00

I want to cancel the "print preview" option in the printer preferences by coding, maybe can use c++ windows api or C#.

Then how to do it ?

Thank you !

1712721546546

Windows development | Windows API - Win32
Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


Answer accepted by question author

KOZ6.0 6,810 Reputation points
2024-04-10T06:24:08.8133333+00:00

It is difficult to set items that are not present in the DEVMODE structure. https://learn.microsoft.com/en-us/windows-hardware/drivers/display/the-devmodew-structure

Ask your printer manufacturer.

Was this answer helpful?

1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Castorix31 91,871 Reputation points
    2024-04-10T06:37:28.8033333+00:00

    I don't have this option on my printer, but normally with DocumentProperties,

    like the test I had done in this thread : https://learn.microsoft.com/en-us/answers/questions/748446/controle-printer-setting-using-vb-net

    Was this answer helpful?

    1 person found this answer helpful.

  2. Xiaopo Yang - MSFT 12,736 Reputation points Microsoft External Staff
    2024-04-10T06:07:20.3433333+00:00

    Hello @szmm,

    This UI is owned by System so you cannot custom it.

    Thank you.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.