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

Form.OnClosed メソッド

Closed イベント発生させます

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

Protected Overridable Sub
 OnClosed ( _
    e As EventArgs _
)
Dim e As EventArgs

Me.OnClosed(e)
protected virtual void OnClosed (
    EventArgs e
)
protected:
virtual void OnClosed (
    EventArgs^ e
)
protected void OnClosed (
    EventArgs e
)
protected function OnClosed (
    e : EventArgs
)

パラメータ

e

イベント データ格納している EventArgs。

解説解説
使用例使用例

Form派生クラスOnClosed メソッドオーバーライドする方法次のコード例示します

Public Class myForm
    Inherits Form

    Protected Overrides Sub
 OnClosed(ByVal e As EventArgs)
        MessageBox.Show("The form is now closing.",
 "Close Warning", _
            MessageBoxButtons.OK, MessageBoxIcon.Warning)
        MyBase.OnClosed(e)
    End Sub

    Public Sub New()
        MyBase.New()
    End Sub

End Class

public class myForm:
    Form

{
    protected override void OnClosed(EventArgs
 e)
    {
        MessageBox.Show("The form is now closing.", 
            "Close Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        base.OnClosed(e);
    }

    public myForm() : base()
    {        
    }

}

public ref class myForm: public
 Form
{
protected:
   virtual void OnClosed( EventArgs^ e ) override
   {
      MessageBox::Show( "The form is now closing.", "Close Warning",
 MessageBoxButtons::OK, MessageBoxIcon::Warning );
      Form::OnClosed( e );
   }

public:
   myForm()
      : Form()
   {}

};
public class myForm extends Form
{
    protected void OnClosed(EventArgs e)
    {
        MessageBox.Show("The form is now closing.", "Close Warning",
 
            MessageBoxButtons.OK, MessageBoxIcon.Warning);
        super.OnClosed(e);
    } //OnClosed

    public myForm()
    {
        super();
    } //myForm
} //myForm
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS