語言

WebBrowser.ShowPropertiesDialog 方法

定義

開啟目前文件的Internet Explorer Properties對話框。

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

範例

以下程式碼範例示範如何使用 ShowPropertiesDialog 方法實作一個與 Internet Explorer File選單相似的 Properties 選單選項。 這個例子要求你的表單包含一個選單,裡面有一個叫做選單項目的選單項目和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

備註

你可以用這個方法實作一個Properties選單選項,類似Internet Explorer File選單中的選項。 此方法會顯示 屬性 對話框,內容包含目前文件的類型、URL、大小,以及建立與修改日期等資訊。

適用於