PrintDocument.PrintController 속성

정의

인쇄를 하도록 도와줄 인쇄 컨트롤러를 가져오거나 설정합니다.

public:
 property System::Drawing::Printing::PrintController ^ PrintController { System::Drawing::Printing::PrintController ^ get(); void set(System::Drawing::Printing::PrintController ^ value); };
[System.ComponentModel.Browsable(false)]
public System.Drawing.Printing.PrintController PrintController { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.PrintController : System.Drawing.Printing.PrintController with get, set
Public Property PrintController As PrintController

속성 값

인쇄를 하도록 도와줄 PrintController입니다. 기본값은 PrintControllerWithStatusDialog 클래스의 새 인스턴스입니다.

특성

예제

다음 코드 예제에서는 라는 myPrintDocument클래스의 PrintDocument instance 만들어야 합니다. 이 예제에서는 클래스의 PrintController 새 instance 만들고, 의 속성myPrintDocumentPrintController 할당하고, 문서를 인쇄합니다.

이 예제에서는 System.Drawing.PrintingSystem.Windows.Forms 네임스페이스를 사용합니다.

public:
   void myPrint()
   {
      if ( useMyPrintController == true )
      {
         myPrintDocument->PrintController =
            gcnew myControllerImplementation;
         if ( wantsStatusDialog == true )
         {
            myPrintDocument->PrintController =
               gcnew PrintControllerWithStatusDialog(
                  myPrintDocument->PrintController );
         }
      }
      myPrintDocument->Print();
   }
public void myPrint()
{
   if (useMyPrintController == true)
   {
      myPrintDocument.PrintController = 
         new myControllerImplementation();     
      if (wantsStatusDialog == true)
      {
         myPrintDocument.PrintController = 
            new PrintControllerWithStatusDialog
            (myPrintDocument.PrintController);
      }
   }
   myPrintDocument.Print();
}
Public Sub myPrint()
    If useMyPrintController = True Then
        myPrintDocument.PrintController = New myControllerImplementation()
        If wantsStatusDialog = True Then
            myPrintDocument.PrintController = _
               New PrintControllerWithStatusDialog( _
               myPrintDocument.PrintController)
        End If
    End If
    myPrintDocument.Print()
End Sub

설명

인쇄 컨트롤러는 여러 가지 방법으로 인쇄 프로세스를 안내합니다. 예를 들어 문서를 인쇄하려면 문서를 개체로 Graphics 변환해야 합니다. 은 PrintController 인쇄 미리 보기용 이미지 또는 실제로 문서를 인쇄할 프린터에서 그래픽을 그릴 위치를 지정합니다. 인쇄 컨트롤러는 문서를 즉시 인쇄할지 또는 지정된 간격을 기다릴지 지정할 수도 있습니다.

적용 대상

추가 정보