lcCaption = "My application" && the real application window caption _screen.Caption = lcCaption + sys(2015) && temporarily hack the caption lnHWND = FindWindow( ... lcCaption ... ) if ( lnHWND > 0 ) return endif _screen.Caption = lcCaption && set to the real caption>I used your code in my main.prg under the command :