Is this cross platform, or could you just use the Windows API?

User137's solution involves using Delphi's VCL etc, the units Forms and I think Standard Controls (plus the units they use, so and so forth) would be the minimum, probably overkill for what you need.