次の方法で共有


PrintControllerWithStatusDialog クラス

ドキュメントの印刷方法を制御します。

この型のすべてのメンバの一覧については、PrintControllerWithStatusDialog メンバ を参照してください。

System.Object
   System.Drawing.Printing.PrintController
      System.Windows.Forms.PrintControllerWithStatusDialog

Public Class PrintControllerWithStatusDialog
   Inherits PrintController
[C#]
public class PrintControllerWithStatusDialog : PrintController
[C++]
public __gc class PrintControllerWithStatusDialog : public
   PrintController
[JScript]
public class PrintControllerWithStatusDialog extends
   PrintController

スレッドセーフ

この型の public static (Visual Basicでは Shared) のすべてのメンバは、マルチスレッド操作で安全に使用できます。インスタンスのメンバの場合は、スレッドセーフであるとは限りません。

解説

このクラスは PrintController を実装し、ステータス ダイアログ ボックスを追加します。プリント コントローラは、 PrintDocument の印刷方法を指定します。

PrintControllerWithStatusDialog のインスタンスの初期プロパティ値の一覧については、 PrintControllerWithStatusDialog コンストラクタのトピックを参照してください。

使用例

[Visual Basic, C#, C++] 新しい PrintController を作成し、 PrintController プロパティに割り当てる方法を次に示します。この例は、クラスに System.Drawing.Printing 名前空間が追加され、 PrintDocument の新しいインスタンスを myDocumentPrinter として作成済みであることを前提にしています。

 
Sub myPrint()
    If useMyPrintController = True Then
        myDocumentPrinter.PrintController = New myControllerImplementation()
        If wantsStatusDialog = True Then
            myDocumentPrinter.PrintController = _
               New PrintControllerWithStatusDialog(myDocumentPrinter.PrintController)
        End If
    End If
    myDocumentPrinter.Print()
End Sub


[C#] 
void myPrint() {
   if (useMyPrintController==true) {
      myDocumentPrinter.PrintController = new myControllerImplementation();     
      if (wantsStatusDialog==true) {
         myDocumentPrinter.PrintController =
           new PrintControllerWithStatusDialog(myDocumentPrinter.PrintController);
      }
   }
   myDocumentPrinter.Print();
}


[C++] 
void myPrint() {
   if (useMyPrintController) {
      myDocumentPrinter->PrintController = new myControllerImplementation();     
      if (wantsStatusDialog) {
         myDocumentPrinter->PrintController =
           new PrintControllerWithStatusDialog(myDocumentPrinter->PrintController);
      }
   }
   myDocumentPrinter->Print();
}

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

名前空間: System.Windows.Forms

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

アセンブリ: System.Windows.Forms (System.Windows.Forms.dll 内)

参照

PrintControllerWithStatusDialog メンバ | System.Windows.Forms 名前空間 | PrintController