Block of Code

Practical Examples for Programmers

  • Home
  • C++
  • Java
  • Visual Basic
  • Discrete Math
  • Ask a Question

Megacities

This exercise requires the Megacities database.  Using Visual Basic, write a program that displays (in a DataGridView control) the names of all the cities, their countries, and the projected percentage growth of their populations from 2010 to 2015.  Records should be sorted in descending order by their projected population growth.  See the figure below.

Megacities Screenshot

Suggested Control Names and Attributes:

Name Property Text Property Control Type Notes
 frmMegacities Megacities Form Holds Controls
 btnDisplay Display Data Button Triggers event to display data
 dgvOutput DataGridView Displays data

Secondary Sidebar

This is the secondary sidebar

Copyright © 2025 · Metro Pro Theme on Genesis Framework · WordPress · Log in