Using a bit of LINQ:
foreach(var pb in this.Controls.OfType<PictureBox>())
{
//do stuff
}
However, this will only take care of PictureBoxes in the main container.
More Related Contents:
- How to get ALL child controls of a Windows Forms form of a specific type (Button/Textbox)?
- Question about terminating a thread cleanly in .NET
- Make an Installation program for C# applications and include .NET Framework installer into the setup
- How do I pass a value from a child back to the parent form?
- Word wrap for a label in Windows Forms
- How do I get the title of the current active window using c#?
- How to get an HtmlElement value inside Frames/IFrames?
- How to compare two rich text box contents and highlight the characters that are changed?
- How to make two transparent layer with c#?
- How to get the “friendly” OS Version Name?
- Disable JavaScript error in WebBrowser control
- MVP examples for Windows Forms
- Generic base class for WinForm UserControl
- Change border color in TextBox C#
- Hiding unwanted properties in custom controls
- Remove the title bar in Windows Forms
- C#: How to add subitems in ListView
- Process.Start to open an URL, getting an Exception?
- Remove Row inside TableLayoutPanel makes a layout problem
- Synchronize Scroll Position of two RichTextBoxes?
- How to create a Button that can send keys to a conrol without losing focus – Virtual Keyboard
- BindingList.Sort() to behave like a List.Sort()
- Toggle switch control in Windows Forms
- WinForms DataGridView – databind to an object with a list property (variable number of columns)
- Prevent from displaying of Windows Security window
- Process.Start(url) fails
- How to use dependency injection in WinForms
- Fire Form KeyPress event
- Prevent Winforms Designer from Generating Property Values for Inherited Controls
- How to create a Button that can send keys to a control without stealing the focus – Virtual Keyboard