I think the problem you are having may be slightly different than the one I once was having, but I thought I would suggest the code that worked for me:

Code:
  
function refreshdesktop()
SetFocus("Program Manager")
SendKeys("{F5}")
endfunction

_________________________
(... better days ahead)