EventDescriptorCollection.Find メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > EventDescriptorCollection.Find メソッドの意味・解説 

EventDescriptorCollection.Find メソッド

コレクション内の指定した名前を持つイベント説明取得します

名前空間: System.ComponentModel
アセンブリ: System (system.dll 内)
構文構文

Public Overridable Function
 Find ( _
    name As String, _
    ignoreCase As Boolean _
) As EventDescriptor
Dim instance As EventDescriptorCollection
Dim name As String
Dim ignoreCase As Boolean
Dim returnValue As EventDescriptor

returnValue = instance.Find(name, ignoreCase)
public virtual EventDescriptor Find (
    string name,
    bool ignoreCase
)
public:
virtual EventDescriptor^ Find (
    String^ name, 
    bool ignoreCase
)
public EventDescriptor Find (
    String name, 
    boolean ignoreCase
)
public function Find (
    name : String, 
    ignoreCase : boolean
) : EventDescriptor

パラメータ

name

コレクションから取得するイベントの名前。

ignoreCase

イベント大文字と小文字区別しない場合trueそれ以外場合false

戻り値
指定した名前の EventDescriptor。イベント存在しない場合null 参照 (Visual Basic では Nothing)。

解説解説
使用例使用例

特定の EventDescriptor検索するコード例次に示します見つかった EventDescriptorコンポーネントの型をテキスト ボックス出力します。この例では、button1textBox1フォーム上でインスタンス化されていることが必要です。

Private Sub FindEvent()
    ' Creates a new collection and assigns it the events for button1.
    Dim events As EventDescriptorCollection
 = TypeDescriptor.GetEvents(button1)
    
    ' Sets an EventDescriptor to the specific event.
    Dim myEvent As EventDescriptor = events.Find("Resize",
 False)
    
    ' Prints the event name and event description.
    textBox1.Text = myEvent.Name & ": " &
 myEvent.Description
End Sub 'FindEvent
private void FindEvent() {
    // Creates a new collection and assigns it the events for button1.
    EventDescriptorCollection events = TypeDescriptor.GetEvents(button1);
 
    // Sets an EventDescriptor to the specific event.
    EventDescriptor myEvent = events.Find("Resize", false);
 
    // Prints the event name and event description.
    textBox1.Text = myEvent.Name + ": " + myEvent.Description;
 }

private:
   void FindEvent()
   {
      // Creates a new collection and assigns it the events for button1.
      EventDescriptorCollection^ events = TypeDescriptor::GetEvents( button1 );
      
      // Sets an EventDescriptor to the specific event.
      EventDescriptor^ myEvent = events->Find( "Resize", false
 );
      
      // Prints the event name and event description.
      textBox1->Text = String::Concat( myEvent->Name, ": ", myEvent->Description
 );
   }
private void FindEvent()
{
    // Creates a new collection and assigns it the events for button1.
    EventDescriptorCollection events = TypeDescriptor.GetEvents(button1);

    // Sets an EventDescriptor to the specific event.
    EventDescriptor myEvent = events.Find("Resize", false);

    // Prints the event name and event description.
    textBox1.set_Text(myEvent.get_Name() + ": " 
        + myEvent.get_Description());
} //FindEvent
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
EventDescriptorCollection クラス
EventDescriptorCollection メンバ
System.ComponentModel 名前空間
EventDescriptor クラス
TypeDescriptor


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

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

辞書ショートカット

すべての辞書の索引

EventDescriptorCollection.Find メソッドのお隣キーワード
検索ランキング

   

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



EventDescriptorCollection.Find メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS