See Sub Main()?

The code goes into a static module, not a Form.

Works on XP, Vista, and Windows 7 - but they have to be 32-bit as written.