PrintingPermission

Table A-6 shows the required PrintingPermission settings for PowerScript system functions in Windows Forms targets.

Table A-6: Printing Permission required for system functions in Windows Forms

System function

Permission required

Print, PrintBitmap, PrintCancel, PrintClose, PrintDataWindow, PrintDefineFont, PrintGetPrinter, PrintScreen, PrintSend, PrintSetFont, PrintSetSpacing, PrintLine, PrintOpen.PrintOval, PrintPage, PrintRect, PrintRoundRect, PrintSetupPrinter, PrintText, PrintWidth, PrintX, PrintY

DefaultPrinting or AllPrinting

PrintGetPrinters, PrintSetPrinter, PrintSetup

AllPrinting

Table A-7 shows the required PrintingPermission settings for object and control functions in Windows Forms targets.

Table A-7: PrintingPermission required for object or control functions in Windows Forms

Object or control

Function or property

Permission required

DataWindow

Print with no arguments

DefaultPrinting or AllPrinting

Print (canceldialog, true)

AllPrinting

DataStore

Print

DefaultPrinting or AllPrinting

DragObject

Print

DefaultPrinting or AllPrinting

RichTextEdit

PrintEx (cancelDialog)

DefaultPrinting or AllPrinting

Window

Print

DefaultPrinting or AllPrinting

Example

The following example allows printing to the default printer and the use of a restricted printer selection dialog box :

<IPermission
  class="System.Drawing.Printing.PrintingPermission,   System.Drawing, Version=2.0.0.0, Culture=neutral,   PublicKeyToken=b03f5f7f11d50a3a" version="1"   Level="DefaultPrinting" />