i tried putting form1.setfocus in form_load and it gave me the same error, try putting it in a procedure that it gurranteed to make sure form1 doesn't have the focus or is visible.