page-setup

How to make the "PageSetting" dialogbox of Notepad.exe in .NET app?


I Want make a PageSetting dialogbox by .NET like this in Notepad.exe:

PageSetting in notepad.exe

I write the code use System.Windows.Forms.PageSetupDialog, it just look like this:

PageSetupDialog in .Net app

I tried the PAGESETUPDLG.lpPageSetupTemplateName with Win32 API, it works. But the UI is too ugly.

How can I use only the .net class to make the dialogbox likes in Notepad.exe?


Solution

  • Thanks to @Hans Passant. I got an infomation from your answeer. then I found the page is very helpful to the question.

    The link