ImageList.ImageCollection.AddStrip メソッドとは? わかりやすく解説

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

ImageList.ImageCollection.AddStrip メソッド

指定したイメージイメージ ストリップImageList追加します

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

例外例外
例外種類条件

ArgumentException

追加しようとしているイメージnull 参照 (Visual Basic では Nothing) です。

または

追加しようとしているイメージBitmap ではありません。

InvalidOperationException

イメージ追加できません。

または

追加されるイメージ ストリップの幅が 0 か、または既存イメージの幅と等しくありません。

または

イメージ ストリップの高さが既存イメージの高さと等しくありません。

解説解説
使用例使用例

AddStrip使用する方法次の例に示します。この例を実行するには、imageList1 という名前の ImageListボタン配置されている Windows フォーム次のコード貼り付け、このボタンClick イベント処理する際に AddStripToCollection メソッド呼び出します。

Private Sub AddStripToCollection() 
    ' Add the image strip.
    Dim bitmaps As New Bitmap(GetType(PrintPreviewDialog),
 "PrintPreviewStrip.bmp")
    imageList1.Images.AddStrip(bitmaps)
    
    ' Iterate through the images and display them on the form.
    Dim i As Integer
    For i = 0 To imageList1.Images.Count
        
        imageList1.Draw(Me.CreateGraphics(), New
 Point(10, 10), i)
        Application.DoEvents()
        System.Threading.Thread.Sleep(1000)
    Next i
 
End Sub



public void AddStripToCollection()
{
    // Add the image strip.
    Bitmap bitmaps = new Bitmap(typeof(PrintPreviewDialog), "PrintPreviewStrip.bmp");
    imageList1.Images.AddStrip(bitmaps);
    
    // Iterate through the images and display them on the form.
    for (int i = 0; i < imageList1.Images.Count;
 i++) {
    
        imageList1.Draw(this.CreateGraphics(), new
 Point(10,10), i);
        Application.DoEvents();
        System.Threading.Thread.Sleep(1000);
        
    }
    

}
public:
    void AddStripToCollection()
    {
        // Add the image strip.
        Bitmap^ bitmaps = gcnew Bitmap(PrintPreviewDialog::typeid,
            "PrintPreviewStrip.bmp");
        imageList1->Images->AddStrip(bitmaps);
        // Iterate through the images and display them on the form.
        for (int i = 0; i < imageList1->Images->Count;
 i++)
        {
            imageList1->Draw(this->CreateGraphics(), Point(10,10),
 i);
            Application::DoEvents();
            System::Threading::Thread::Sleep(1000);
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ImageList.ImageCollection クラス
ImageList.ImageCollection メンバ
System.Windows.Forms 名前空間



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

辞書ショートカット

すべての辞書の索引

ImageList.ImageCollection.AddStrip メソッドのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS