View Single Post
  #2 (permalink)  
Old 03-08-2008, 08:38 AM
agraham's Avatar
agraham agraham is online now
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,372
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

At the lowest level everything in the Windows OS itself that you can interact with on the screen is a window. Each will be associated with a block of code called a Window Procedure (WndProc) which the OS calls passing Windows Messages. Each message comprises a number that identifies the message and two Int32 parameters called wParam and lParam. The contents of lParam and wParam depend upon the message. One of the most important messages is WM_PAINT that tells a window to draw itself.

From a higher point of view the distinction between Forms/Windows and Controls is what their WndProcs are written to do rather than how they are implemented. Forms are the top level containers that can host controls and other Forms. Controls provide the base level of user interaction accepting input and displaying results. However both are still based upon the Control class within .NET which as the documentation says "Defines the base class for controls, which are components with visual representation" so semantically, within .NET, nearly everything is a Control.
Reply With Quote