WebBrowser.ShowPrintDialog メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As WebBrowser instance.ShowPrintDialog

このメソッドを使用して、Internet Explorer の [ファイル] メニューにある [印刷] メニュー項目のような機能を実装できます。このメソッドは [印刷] ダイアログ ボックスを開きます。ユーザーはこれを使用して、印刷の前に印刷設定を変更できます。ユーザーが印刷の前にページ設定を指定できるようにするには、ShowPageSetupDialog メソッドを使用します。[印刷プレビュー] ダイアログ ボックスを表示するには、ShowPrintPreviewDialog メソッドを使用します。

ShowPrintDialog メソッドを使用して、Internet Explorer の [ファイル] メニューの [印刷] メニュー オプションのような機能を実装する方法を次のコード例に示します。この例は、MenuItemFilePrint という名前のメニュー項目を含むメニューがフォームに含まれていることを前提としています。
' Displays the Print dialog box. Private Sub printToolStripMenuItem_Click( _ ByVal sender As Object, ByVal e As EventArgs) _ Handles printToolStripMenuItem.Click webBrowser1.ShowPrintDialog() End Sub


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からWebBrowser.ShowPrintDialog メソッドを検索する場合は、下記のリンクをクリックしてください。

- WebBrowser.ShowPrintDialog メソッドのページへのリンク