zoukankan      html  css  js  c++  java
  • WIN锁屏+鼠标移动事件

      winexec('rundll32.exe user32.dll, LockWorkStation', sw_hide);

    1.shutdown.bat(关机) 
        rundll32.Exe shell32.dll SHExitWindowsEx 1 

        2.logoff.bat(注销) 
        rundll32.Exe shell32.dll SHExitWindowsEx 0 

        3.reboot.bat(重启) 
        rundll32.Exe shell32.dll SHExitWindowsEx 2 

        4.lock.bat(锁定桌面) 
        rundll32.Exe user32.dll LockWorkStation 

     1 procedure TForm1.WndProc(var nMsg: TMessage);
     2 var s:string;
     3     procedure setShow(AShow: Integer);
     4     begin
     5       case AShow of
     6         0: Memo1.Lines.Add('');
     7         1: Memo1.Lines.Add('');
     8         2: Memo1.Lines.Add('');
     9         3: Memo1.Lines.Add('');
    10         4: Memo1.Lines.Add('');
    11       end;
    12     end;
    13 begin
    14   inherited;
    15   if (nMsg.Msg  = WM_MOUSEMOVE) then
    16   begin
    17     if (nX < nMsg.LParamLo) then
    18       setShow(1)
    19     else if (nX > nMsg.LParamLo) then
    20       setShow(2)
    21     else if (nY < nMsg.LParamHi) then
    22       setShow(3)
    23     else if (nY > nMsg.LParamHi) then
    24       setShow(4)
    25     else
    26       setShow(0);
    27     nX := nMsg.LParamLo;
    28     nY := nMsg.LParamHi;
    29     Label1.Caption := '...';
    30   end;
    31 end;
    View Code
  • 相关阅读:
    【Rust】文件操作
    【Rust】转义字符
    【Rust】原始标识符
    【Rust】字节数组
    【Rust】文档测试
    【Rust】外部函数接口
    【Rust】不安全操作
    【Rust】单元测试
    【Rust】集成测试
    WPF之ComboBox 安静点
  • 原文地址:https://www.cnblogs.com/FKdelphi/p/10040502.html
Copyright © 2011-2022 走看看