⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clsprintdialog.txt

📁 数据库打印例子宫
💻 TXT
字号:
'
' =======================================================================
'
' CLASS   : clsPrintDialog
' PURPOSE : Show a dialog to select a printer and to set printer
'           properties. Selected printer will be set to Printer object
'           WITHOUT CHANGING DEFAULT PRINTER.
'           Printer object could print to selected printer then.
'           This class work like "MS Common Dialogs" ShowPrinter method,
'           but it set Printer object without changing default printer.
' HELP    : Look "MS Common Dialogs" OCX help, it applies also to this
'           class. All Flags constants are supported.
' NOTE    : Do you have found any bug or improvement ?
'           Please let me know, that's why I'm sharing source code.
' AUTHOR  : ___________________________________________________
'            Luca Minudel                    software designer
'            Italy Conegliano(TV)
'            voice & fax                     +39 (0)438 412280
'            e-mail                      luca.minudel@nline.it
'            WWW                       (italian language used)
'            http://www.geocities.com/SiliconValley/Vista/4041
'
' =======================================================================
'

Try the class with this code :

Dim P As New clsPrintDialog
  P.Flags = cdlPDPageNums + cdlPDDisablePrintToFile + cdlPDNoSelection
  P.Min = 1
  P.FromPage = 3
  P.ToPage = 5
  P.Max = 100
  P.ShowPrinter
  Debug.Print Printer.DeviceName
  Debug.Print Printer.Copies
  Debug.Print P.FromPage
  Debug.Print P.ToPage
  ' Write here Print Code with Printer Object...


P.S. VB4 doesn't support public costant declaration in class module.
     To use this code with VB4 remove Enum declarations and put
     costant declarations in a .BAS module.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -