DocumentProperties Lib "winspool.drv" Alias "DocumentPropertiesA" (ByVal hwnd As Long, ByVal hPrinter As Long, ByVal pDeviceName As String, pDevModeOutput As DEVMODE, pDevModeInput As DEVMODE, ByVal fMode As Long) As Long

解决方案 »

  1.   

    参数表:
      hwnd -----------  Long. 对话框父窗口句柄.通常是当前的活动窗体  hPrinter -------  Long.一个以打开的打印机对象的句柄  pDeviceName ----  String.打印机 的名字  pDevModeOutput -  Long.指向一个DEVMODE数据结构的指针.请参考DocumentProperties运行模式表.注意这个指针必需引用一个足够大的缓冲区,它能同时容下专用打印机驱动程序数据,以及标准的DEVMODE结构  pDevModeInput --  Long.指向一个DEVMODE数据结构的指针.请参考DocumentProperties运行模式表  fMode ----------  Long.决定这个函数运作模式的标志.请参考DocumentProperties运行模式表
      

  2.   

    DocumentProperties  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_7k1f.asp
      

  3.   

    关于DevMode结构和DocumentProperties的使用可参考下面的例子。  Q282474 HOWTO: Print Using Custom Page Sizes on Windows NT/2000
      http://support.microsoft.com/support/kb/articles/q282/4/74.asp
      Q180645 FIX: Cannot Change Page Settings During Print Job
      http://support.microsoft.com/support/kb/articles/q180/6/45.asp