>>Try do set a breakpoint on when thisform.visible changes.
>
>I tried and it stops, but only after it finished doing whatever it was doing without showing a trace. If those commands can be traced the source of the problem can be found. Do you have any ideas?
Anything calling form.activate or setting focus to any control?