Windows operates on message loops
The message loop sits and waits on something to happen
Then it fires event to proper window
Windows controls can generate many events
When you click a button, you fire an event
You write code to handle these events

Most Windows applications have more than one window
Many pop up dialog boxes
Others may have many windows
Form
A window is called a form in design time and it is called a window in runtime
Hierarchy

You start your project with a single form
Called form1 by default
Solution explorer has an item called myProject

Here you can set your startup form
This is the form that shows when you first start up


Properties
Text
Use the text property to change the form’s title
Form1.text=”Text for the titlebar”
ShowInTaskBar
Boolean value whether this form will show in the taskbar
WindowState
Has one of 3 values identifying if the window is minimized or maximized or not
- Normal
- Minimized
- Maximized
Accept button
The button that will fire the click event when you press the Enter key
Cancel Button
The button that will be used to cancel
StartPosition
How your window will be positioned when it first starts
- centerParent
- centerScreen
- manual-set it with the control’s location property
- windowsDefaultLocation
- WindowsDefaultBound- rarely used
Autoscroll
Boolean value determining if the form will display a scrollbar if content is too big for it
Name
Name you use to refer to your form
Each form has a default instance which you can access:
My.forms.form1.show()