If you are using VB 6 there is a startup form property.