Skip to content

Control vs. Component

Components are .NET objects that can be added to a form that provide additional functionality or interactivity to the form. Controls, on the other hand, are a specialized type of component that inherits from the System.Windows.Forms.Control class. Controls are explicitly designed to render visually on the screen, occupy geometric space (width, height, coordinates), and interact directly with user inputs (like mouse clicks or keystrokes).
  • Timer: Triggers events at specified intervals in the background.
  • ErrorProvider: Attaches to and displays validation errors next to input controls.
  • ImageList: Acts as a background repository for managing a collection of images.
  • TextBox: Provides a visual region for user text input.
  • Button: Offers a clickable user interface element to trigger actions.
  • GroupBox: Visually groups and arranges sets of related controls.

In the ScriptoForm PowerShell script file, both controls and components are collectively instantiated in the Controls region.