HtmlElementInsertionOrientation 列挙体とは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HtmlElementInsertionOrientation 列挙体の意味・解説 

HtmlElementInsertionOrientation 列挙体

メモ : この列挙体は、.NET Framework version 2.0新しく追加されたものです。

InsertAdjacentElement の使用時新し要素挿入される位置を表す値を定義します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Enumeration HtmlElementInsertionOrientation
Dim instance As HtmlElementInsertionOrientation
public enum HtmlElementInsertionOrientation
public enum class HtmlElementInsertionOrientation
public enum HtmlElementInsertionOrientation
public enum HtmlElementInsertionOrientation
メンバメンバ
使用例使用例

次のコード例では、ユーザーが ADatum.com サーバー以外から表示するすべてのページ最上部に、DIV 要素挿入します。この例では、フォームWebBrowser1 という名前の WebBrowser コントロール含まれている必要がありますまた、名前空間 System.Text.RegularExpressions をインポートする必要もあります

public void AddDivMessage()
{
    Uri currentUri = new Uri(webBrowser1.Url.ToString());
    String hostName = null;

    // Ensure we have a host name, and not just an IP, against which
 to test.
    if (!(currentUri.HostNameType == UriHostNameType.Dns))
    {
        DnsPermission permit = new DnsPermission(System.Security.Permissions.PermissionState.Unrestricted);
        permit.Assert();

        IPHostEntry hostEntry = System.Net.Dns.GetHostEntry(currentUri.Host);
        hostName = hostEntry.HostName;
    } else {
        hostName = currentUri.Host;
    }

    if (!hostName.Contains("adatum.com"))
    {
        AddTopPageMessage("You are viewing a web site other than ADatum.com.
 " +
            "Please exercise caution, and ensure your Web surfing complies with
 all " +
            "corporate regulations as laid out in the company
 handbook.");
    }
}

private void AddTopPageMessage(String message)
{
    if (webBrowser1.Document != null) 
    {
        HtmlDocument doc = webBrowser1.Document;

        // Do not insert the warning again if it already exists. 
        HtmlElementCollection returnedElems = doc.All.GetElementsByName("ADatumWarningDiv");
        if ((returnedElems != null) &&
 (returnedElems.Count > 0)) 
        {
            return;
        }

        HtmlElement divElem = doc.CreateElement("DIV");
        divElem.Name = "ADatumWarningDiv";
        divElem.Style = "background-color:black;color:white;font-weight:bold;width:100%;";
        divElem.InnerText = message;

        divElem = doc.Body.InsertAdjacentElement(HtmlElementInsertionOrientation.AfterBegin,
 divElem);
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からHtmlElementInsertionOrientation 列挙体を検索した結果を表示しています。
Weblioに収録されているすべての辞書からHtmlElementInsertionOrientation 列挙体を検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からHtmlElementInsertionOrientation 列挙体 を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

HtmlElementInsertionOrientation 列挙体のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HtmlElementInsertionOrientation 列挙体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS