CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    5

    Changing a print driver setting in .NET?

    Hello,

    Using VB.NET or C#, how can I programmatically change the current page length setting in a print driver?

    I need to change the actual setting in the printer preferences, as the typical .NET PrinterSettings and DefaultPageSettings options will not work for this application. I assume that I’ll need to go through the Windows API or use the DevMode structure, but there is little to no documentation that I could find about this as it is done in .NET.

    Any and all tips will be much appreciated.

    Regards,

    --Josh

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    hello ,
    looks like if its not possible by .NET class methods then you will need to interact with Win32API functions which are

    1) PrintDlgEx function

    you can recall the interface for the printer driver settings. and implement the own. for that you need to make the dll first and then wrap it around .NET. that would be the best.

    Reffer MSDN

    there are articles inside when you look at it.

    check out MSDN for further details
    there may be ready sample for your initial work too. you should also check CodeGuru site for VC++ sample section which is great.

    Thank you,
    Paresh
    - Software Architect

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

Featured