You might try some standards for ActiveX controls: _VFP.Autoyield = .F.
And especially for the webbrowser control, put NODEFAULT in it's Refresh() method.
In regard to further discussion. Do I get you right with the following interpretation:
What do you mean with "a grid which I scroll down and I can see the pdf's". The webbrowser control is in the grid?
Or is it this way?
Does the grid show file names and once you chosse a grid row the pdf is displayed in a webbrowser control on the form, but outside the grid?
I don't know the details going on, but I do know in genral every ActiveX Control is just an embedded Form, you have a form inside a form therefore you can eaasily have focus problems, because most probably the foxpro form lost focus to the ActiveX control (form).
If you setfocus() to some control of an inactive form, it normally will get the active form again, but ActiveX controls can be somewhat problematic hndering the focus to go back to the foxpor parent form.
If all else fails you should declare SetActiveWindow and set the vfp form active additionally to setting grid.setfocus(). You might also call Refresh() of the grid to make it display it's focus.
Bye, Olaf.