GetForegroundWindow函数 获取一个前台窗口的句柄(用户当前工作的窗口)。

函数原型:HWND GetForegroundWindow(void);
参数:无
返回值:一个前台窗口的句柄。在某些情况下,如一个窗口失去激活时,前台窗口可以是NULL。

var
  p: array[0..254] of Char;
begin
  if h <> GetForegroundWindow then
  begin
    h := GetForegroundWindow;
    GetWindowText(h, p, 255);
    if p <> '' then Memo1.Lines.Add(p);
  end;
end;

GetWindowText函数

 

 

创建时间:2020.01.03  

 

相关文章:

  • 2022-12-23
  • 2022-01-27
  • 2022-12-23
  • 2021-05-15
  • 2021-12-27
  • 2021-12-12
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-12-01
相关资源
相似解决方案