語言

UrlBuilder 類別

定義

啟動一個網址編輯器,允許使用者選擇或建立 URL。 此類別無法獲得繼承。

public ref class UrlBuilder sealed
public sealed class UrlBuilder
type UrlBuilder = class
Public NotInheritable Class UrlBuilder
繼承
UrlBuilder

範例

以下程式碼範例展示了如何在設計時使用 BuildUrl 該方法從選單指令啟動 URL 建構器。

// Create a parent control.
System::Windows::Forms::Control^ c = gcnew System::Windows::Forms::Control;
c->CreateControl();

// Launch the Url Builder using the specified control
// parent, initial URL, empty relative base URL path,
// window caption, filter String* and URLBuilderOptions value.
UrlBuilder::BuildUrl( this->Component, c, "http://www.example.com", "Select a URL", "", UrlBuilderOptions::None );
// This method handles the "Launch Url Builder UI" menu command.
// Invokes the BuildUrl method of the System.Web.UI.Design.UrlBuilder.
private void launchUrlBuilder(object sender, EventArgs e)
{
    // Create a parent control.
    System.Windows.Forms.Control c = new System.Windows.Forms.Control();            
    c.CreateControl();            
                
    // Launch the Url Builder using the specified control
    // parent, initial URL, empty relative base URL path,
    // window caption, filter string and URLBuilderOptions value.
    UrlBuilder.BuildUrl(
        this.Component, 
        c, 
        "http://www.example.com", 
        "Select a URL", 
        "", 
        UrlBuilderOptions.None);                      
}
' This method handles the "Launch Url Builder UI" menu command.
' Invokes the BuildUrl method of the System.Web.UI.Design.UrlBuilder.
Private Sub launchUrlBuilder(ByVal sender As Object, ByVal e As EventArgs)
    ' Create a parent control.
    Dim c As New System.Windows.Forms.Control()
    c.CreateControl()

    ' Launch the Url Builder using the specified control
    ' parent, initial URL, empty relative base URL path,
    ' window caption, filter string and URLBuilderOptions value.
    UrlBuilder.BuildUrl( _
        Me.Component, _
        c, _
        "http://www.example.com", _
        "Select a URL", _
        "", _
        UrlBuilderOptions.None)
End Sub

備註

此方法啟動 BuildUrl 一個使用者介面以選擇網址。

方法

名稱 Description
BuildUrl(IComponent, Control, String, String, String, UrlBuilderOptions)

建立一個使用者介面,使用指定的 UrlBuilderOptions 物件來建立或選擇 URL。

BuildUrl(IComponent, Control, String, String, String)

建立一個使用者介面來建立或選擇網址。

BuildUrl(IServiceProvider, Control, String, String, String, UrlBuilderOptions)

建立一個使用者介面,使用指定的 UrlBuilderOptions 物件來建立或選擇 URL。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetType()

取得目前實例的 Type。

(繼承來源 Object)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

適用於

另請參閱