In my uderstanding, what you need here is a good Object Oriented design, where you can pass paramaters both form the command line and the GUI program to the business logic processing.
If you could abstract the logic that does the main job, it would be all about parameter passing.
John Dirk
Programming Consulant
http://www.programminghelp4u.com - Programming (Assignment/Project) Help