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