PrintDocument.PrintController 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
인쇄를 하도록 도와줄 인쇄 컨트롤러를 가져오거나 설정합니다.
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 만들고, 의 속성myPrintDocument
에 PrintController 할당하고, 문서를 인쇄합니다.
이 예제에서는 System.Drawing.Printing 및 System.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 인쇄 미리 보기용 이미지 또는 실제로 문서를 인쇄할 프린터에서 그래픽을 그릴 위치를 지정합니다. 인쇄 컨트롤러는 문서를 즉시 인쇄할지 또는 지정된 간격을 기다릴지 지정할 수도 있습니다.