ImageList.ImageCollection.AddStrip メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As ImageCollection Dim value As Image Dim returnValue As Integer returnValue = instance.AddStrip(value)
戻り値
新しく追加したイメージのインデックス。イメージを追加できなかった場合は -1。



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); } }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- ImageList.ImageCollection.AddStrip メソッドのページへのリンク