Note: There are 2 ways to show a form: modal and non modal. Modal means that the program that shows the form waits until the form is closed to continue processing. This is similar to the way a message box and input box are displayed. The method ShowDialog displays the form modally. The method Show() simply displays the form.
The next example uses the Show method and also sets several properties of the form before displaying it.
1. Start a new Windows application called WeatherForms.
2. Right click each of these pictures and save them to your computer:
3. Build the main form as shown and described below:
Select the image property for each button and import the images. Select a different Background for each button.
4. From the menu select Project, Add Windows Form…Select Windows form from the pop up. Type FrmWeather as the name of the new form.
5. Build FrmWeather with one label named LblInfo with AutoSize=False, stretch the size so that 2 lines will fit. Add a PictureBox named Pic. Set SizeMode to StretchImage.
There is no code for FrmWeather.