• SendMessage 刷新系统桌面


    //方法1 

    uses ShlObj; 
    SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil);


    //方法2
    procedure
    TForm1.Button1Click(Sender: TObject);
    begin
        SendMessage(FindWindow('Progman', 'Program Manager'), WM_COMMAND, $A065,0);
    end;


    //方法3
    procedure
    RefreshDesktop; 
    var c1: THandle;
    begin
      c1:=FindWindowEx(FindWindowEx(FindWindow('Progman','Program Manager'),0,'SHELLDLL_DefView',''),0,'SysListView32','');
      PostMessage(c1,WM_KEYDOWN,VK_F5,0);
      PostMessage(c1,WM_KEYUP,VK_F5,1 shl 31);
    end;





  • 相关阅读:
    rwkj 1337
    poj 1002
    map
    vector
    sort排序
    sort函数
    poj 2945
    poj2388
    rwkj 1422搜索(素数环)
    poj2503
  • 原文地址:https://www.cnblogs.com/xe2011/p/2518893.html
Copyright © 2020-2023  润新知