Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

 

Home ] Up ]


 

Country Statistics Program

 

In this exercise you are to create an application that will display statistical information about selected countries around the world.

1. Prepare a TOE Chart before beginning to build the interface.
2. Create a new application and name the project country.
2.1 The name of the form should be frmcountries.
2.2 Change the Text property to “Country Statistics”.
2.3 Set the WindowState property to Maximized.
2.4 Assign the filename counties to the form file object.
2.5 Set the project’s startup form to frmcountries.
3. In the center of the top of the form, create a label named lbltitle and change the Text property to Selected Country Statistical Information.
3.1 Create a graphic to hold an icon on the form. The icons are located in C:\ProgramFiles\MicrosoftVisualStudio.Net\Common7\Graphics\Icons\Flags and copy the following icons into your bin folder. FLGRSA, FLGJAPAN, FLGUK and FLGUSA02.  (Do a Windows Search to locate the files if you cannot locate the file path.)
4. Create labels and titles to hold the following information (Language, Currency, and Capital City).
5. Create a list box and add the following countries to the Items property (South Africa, Japan, United Kingdom and the United States.
6. Create a simple Microsoft Access Database and name it "countries".  The following categories should be entered into it:  Country, Population, Language, Capital City, Currency
6.1 Assign the following values to each category:
Country Language Capital City Currency
Japan

United Kingdom

United States of Ameria

South Africa

Japanese

English

English

English

Tokyo

London

Washington D.C

Johannesburg

Yen

Pound

US Dollar

Rand

 

 

 

 

 

7. Create a DataAdapter, Connection, and DataSet object for the countries.mdb database.
8. In the general declarations section, load each country icon into a different variable using a statement like the one below
Dim australia As Image = Image.FromFile("flgastrl.ico")
9. Create a picture object to hold the icon of the selected flag. Be sure to change the SizeMode property to StretchImage to fill the object with the entire picture.
10. Create a button to end the application.
11. In the SelectedIndexedChanged event of the list box, assign the correct icon to the picture box using a Select Case statement, checking the listbox’s SelectedItem property.
12. Save the solution, then start and test the application. Make sure you test different countries. Close the application.
13. GUI layout.

 


All content on this site is free for private use only  |  Contributions are encouraged  |  Thank you to Netfirms for the free hosting  |  If copyright content is published here or links to certain content violates some right/law, contact the Webmaster to have it removed immediately.

 

Site launched: October 2005  |  Updated: July 20, 2006  |  Link exchange  |  Site map  |  Contact us