Hmm...Have you tried using module and having a Sub Main () in it to do the thing? Or do you need the form for something?

You could also open the form via Sub Main from the module...Well, I think I better leave answering for someone who is a better helper


Just I thought: you could make external executable for creating the file, so it stays invisible. Just set the form invisible, launch the filecreating executable and show your form again. Should work nicely...