WebBrowser.ShowPropertiesDialog 方法

定義

開啟目前文件的 Internet Explorer [內容] 對話方塊。

public:
 void ShowPropertiesDialog();
public void ShowPropertiesDialog ();
member this.ShowPropertiesDialog : unit -> unit
Public Sub ShowPropertiesDialog ()

範例

下列程式碼範例示範如何使用 ShowPropertiesDialog 方法來實作類似 Internet Explorer檔案功能表上的 [屬性] 功能表選項。 此範例會要求您的表單包含一個功能表項目名為 MenuItemFileProperties 的功能表,以及 WebBrowser 名為 的控制項 webBrowser1.

// Displays the Properties dialog box.
void MenuItemFileProperties_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
   this->WebBrowser1->ShowPropertiesDialog();
}
// Displays the Properties dialog box.
private void propertiesToolStripMenuItem_Click(
    object sender, EventArgs e)
{
    webBrowser1.ShowPropertiesDialog();
}
' Displays the Properties dialog box.
Private Sub propertiesToolStripMenuItem_Click( _
    ByVal sender As Object, ByVal e As EventArgs) _
    Handles propertiesToolStripMenuItem.Click

    webBrowser1.ShowPropertiesDialog()

End Sub

備註

您可以使用此方法來實作類似 Internet Explorer檔案功能表上的 [屬性] 功能表選項。 這個方法會顯示 [ 屬性 ] 對話方塊,其中包含目前檔的相關資訊,例如其類型、URL、大小和建立和修改日期。

適用於