Thanks for the reply Dat, the thing is, is I have alot of code in my initialize event that fills out alot of things on my form, so I would have to create alot of sub-routines out of that code. Which is fine and probably should have done that in the first place, I was just looking for another solution other than doing that. A guy on another board posted an idea I didn't think of. He used the "findwindow" windows api call and looked for the caption of the window. I thought that was a cool way of solving this. Anyway thanks for the help.