본문 바로가기
삽질/Delphi

[Delphi] 바탕화면 강제 새로고침

by 푸딩s 2011. 4. 5.
728x90
반응형



procedure UpdateDesktop;
var
  hDesktop: HWND;
begin

  hDesktop := FindWindowEx(FindWindowEx
    (FindWindow('Progman', 'Program Manager'), 0, 'SHELLDLL_DefView', nil), 0,
    'SysListView32', nil);

  PostMessage(hDesktop, WM_KEYDOWN, VK_F5, 0);
  PostMessage(hDesktop, WM_KEYUP, VK_F5, 1 shl 31);

end;

단점)) 새로고침 되면서 깜빡임!!

728x90
반응형

댓글